File tree Expand file tree Collapse file tree 4 files changed +66
-0
lines changed
main/java/com/diffblue/java_test
test/java/com/diffblue/java_test Expand file tree Collapse file tree 4 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1818 <scope >test</scope >
1919 </dependency >
2020 </dependencies >
21+
22+ <build >
23+ <plugins >
24+ <plugin >
25+ <groupId >org.apache.maven.plugins</groupId >
26+ <artifactId >maven-compiler-plugin</artifactId >
27+ <configuration >
28+ <source >1.8</source >
29+ <target >1.8</target >
30+ </configuration >
31+ </plugin >
32+ <plugin >
33+ <groupId >org.codehaus.mojo</groupId >
34+ <artifactId >cobertura-maven-plugin</artifactId >
35+ <configuration >
36+ <instrumentation >
37+ </instrumentation >
38+ </configuration >
39+ <executions >
40+ <execution >
41+ <id >clean</id >
42+ <phase >pre-site</phase >
43+ <goals >
44+ <goal >clean</goal >
45+ </goals >
46+ </execution >
47+ <execution >
48+ <id >instrument</id >
49+ <phase >site</phase >
50+ <goals >
51+ <goal >instrument</goal >
52+ <goal >cobertura</goal >
53+ </goals >
54+ </execution >
55+ </executions >
56+ </plugin >
57+ </plugins >
58+ </build >
2159</project >
Original file line number Diff line number Diff line change 1+ package com .diffblue .java_test ;
2+
3+ public class Calc
4+ {
5+ int div (int a , int b )
6+ {
7+ return a /b ;
8+ }
9+ }
Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ public class Main
44{
55 void do_stuff (String a , String b )
66 {
7+ int x =Integer .parseInt (a );
8+ int y =Integer .parseInt (b );
9+ int z =new Calc ().div (x ,y );
10+ System .out .println ("" +z );
711 }
812
913 public static void main (String [] args )
Original file line number Diff line number Diff line change 1+ package com .diffblue .java_test ;
2+
3+ import org .junit .*;
4+
5+ public class CalcTest
6+ {
7+
8+ @ Test
9+ public void div0 ()
10+ {
11+ int r =new Calc ().div (2 ,1 );
12+ Assert .assertEquals (r ,2 );
13+ }
14+
15+ }
You can’t perform that action at this time.
0 commit comments