File tree Expand file tree Collapse file tree 11 files changed +14
-50
lines changed
src/test/java/com/iluwatar/model/view/viewmodel
main/java/com/iluwatar/repository
test/java/com/iluwatar/repository
src/test/java/com/iluwatar/value/object Expand file tree Collapse file tree 11 files changed +14
-50
lines changed Original file line number Diff line number Diff line change 39
39
<artifactId >junit-jupiter-engine</artifactId >
40
40
<scope >test</scope >
41
41
</dependency >
42
- <dependency >
43
- <groupId >com.google.guava</groupId >
44
- <artifactId >guava</artifactId >
45
- </dependency >
46
42
</dependencies >
47
43
<build >
48
44
<plugins >
Original file line number Diff line number Diff line change 34
34
<modelVersion >4.0.0</modelVersion >
35
35
<artifactId >filterer</artifactId >
36
36
<dependencies >
37
- <dependency >
38
- <groupId >com.google.guava</groupId >
39
- <artifactId >guava</artifactId >
40
- </dependency >
41
37
<dependency >
42
38
<groupId >org.junit.jupiter</groupId >
43
39
<artifactId >junit-jupiter-api</artifactId >
Original file line number Diff line number Diff line change 37
37
<version >1.26.0-SNAPSHOT</version >
38
38
<properties >
39
39
<zk .version>9.0.0</zk .version>
40
- <guava .version>19.0</guava .version>
41
40
<jetty-maven-plugin .version>9.4.28.v20200408</jetty-maven-plugin .version>
42
41
<maven-war-plugin .version>3.3.2</maven-war-plugin .version>
43
42
<maven-assembly-plugin .version>2.2</maven-assembly-plugin .version>
84
83
<artifactId >junit-jupiter-engine</artifactId >
85
84
<scope >test</scope >
86
85
</dependency >
87
- <dependency >
88
- <groupId >com.google.guava</groupId >
89
- <artifactId >guava-testlib</artifactId >
90
- <version >${guava.version} </version >
91
- <scope >test</scope >
92
- </dependency >
93
86
</dependencies >
94
87
<build >
95
88
<finalName >${project.artifactId} </finalName >
Original file line number Diff line number Diff line change 24
24
*/
25
25
package com .iluwatar .model .view .viewmodel ;
26
26
27
- import static org .hamcrest .CoreMatchers .is ;
28
- import static org .hamcrest .CoreMatchers .not ;
29
- import static org .junit .Assert .assertThat ;
30
27
import static org .junit .jupiter .api .Assertions .assertEquals ;
31
28
import static org .junit .jupiter .api .Assertions .assertFalse ;
29
+ import static org .junit .jupiter .api .Assertions .assertNotEquals ;
32
30
import static org .junit .jupiter .api .Assertions .assertNotNull ;
33
31
import static org .junit .jupiter .api .Assertions .assertNull ;
34
32
import static org .junit .jupiter .api .Assertions .assertTrue ;
35
33
import java .util .List ;
36
34
import org .junit .jupiter .api .BeforeEach ;
37
35
import org .junit .jupiter .api .Test ;
38
- import com .google .common .testing .EqualsTester ;
39
36
40
37
class BookTest {
41
38
@@ -67,13 +64,13 @@ void testBookModel() {
67
64
68
65
@ Test
69
66
void testEquals () {
70
- new EqualsTester (). addEqualityGroup ( testBook , testBookTwo ). testEquals ( );
67
+ assertEquals ( testBook , testBookTwo );
71
68
}
72
69
73
70
@ Test
74
71
void testToString () {
75
- assertThat (testBook .toString (), is ( testBookTwo .toString () ));
76
- assertThat (testBook .toString (), is ( not ( testBookThree .toString ()) ));
72
+ assertEquals (testBook .toString (), testBookTwo .toString ());
73
+ assertNotEquals (testBook .toString (), testBookThree .toString ());
77
74
}
78
75
79
76
@ Test
Original file line number Diff line number Diff line change 40
40
<spring-boot .version>2.7.5</spring-boot .version>
41
41
<jacoco .version>0.8.8</jacoco .version>
42
42
<commons-dbcp .version>1.4</commons-dbcp .version>
43
- <guava .version>19.0</guava .version>
44
43
<htmlunit .version>2.66.0</htmlunit .version>
45
44
<guice .version>4.0</guice .version>
46
45
<system-lambda .version>1.1.0</system-lambda .version>
223
222
<artifactId >commons-dbcp</artifactId >
224
223
<version >${commons-dbcp.version} </version >
225
224
</dependency >
226
- <dependency >
227
- <groupId >com.google.guava</groupId >
228
- <artifactId >guava</artifactId >
229
- <version >${guava.version} </version >
230
- </dependency >
231
225
<dependency >
232
226
<groupId >net.sourceforge.htmlunit</groupId >
233
227
<artifactId >htmlunit</artifactId >
Original file line number Diff line number Diff line change 55
55
<artifactId >junit-jupiter-engine</artifactId >
56
56
<scope >test</scope >
57
57
</dependency >
58
- <dependency >
59
- <groupId >com.google.guava</groupId >
60
- <artifactId >guava</artifactId >
61
- </dependency >
62
58
<dependency >
63
59
<groupId >javax.xml.bind</groupId >
64
60
<artifactId >jaxb-api</artifactId >
Original file line number Diff line number Diff line change 24
24
*/
25
25
package com .iluwatar .repository ;
26
26
27
+ import java .util .List ;
27
28
import org .springframework .data .jpa .repository .JpaSpecificationExecutor ;
28
29
import org .springframework .data .repository .CrudRepository ;
29
30
import org .springframework .stereotype .Repository ;
@@ -36,4 +37,6 @@ public interface PersonRepository
36
37
extends CrudRepository <Person , Long >, JpaSpecificationExecutor <Person > {
37
38
38
39
Person findByName (String name );
40
+
41
+ List <Person > findAll ();
39
42
}
Original file line number Diff line number Diff line change 28
28
import static org .junit .jupiter .api .Assertions .assertNull ;
29
29
import static org .junit .jupiter .api .Assertions .assertTrue ;
30
30
31
- import com .google .common .collect .Lists ;
32
31
import java .util .List ;
33
32
import javax .annotation .Resource ;
34
33
import org .junit .jupiter .api .AfterEach ;
@@ -66,7 +65,7 @@ void setup() {
66
65
67
66
@ Test
68
67
void testFindAll () {
69
- var actuals = Lists . newArrayList ( repository .findAll () );
68
+ var actuals = repository .findAll ();
70
69
assertTrue (actuals .containsAll (persons ) && persons .containsAll (actuals ));
71
70
}
72
71
Original file line number Diff line number Diff line change 28
28
import static org .junit .jupiter .api .Assertions .assertNull ;
29
29
import static org .junit .jupiter .api .Assertions .assertTrue ;
30
30
31
- import com .google .common .collect .Lists ;
32
31
import java .util .List ;
33
32
import javax .annotation .Resource ;
34
33
import org .junit .jupiter .api .AfterEach ;
@@ -66,7 +65,7 @@ void setup() {
66
65
67
66
@ Test
68
67
void testFindAll () {
69
- var actuals = Lists . newArrayList ( repository .findAll () );
68
+ var actuals = repository .findAll ();
70
69
assertTrue (actuals .containsAll (persons ) && persons .containsAll (actuals ));
71
70
}
72
71
Original file line number Diff line number Diff line change 34
34
</parent >
35
35
<artifactId >value-object</artifactId >
36
36
<dependencies >
37
- <dependency >
38
- <groupId >com.google.guava</groupId >
39
- <artifactId >guava-testlib</artifactId >
40
- <version >23.0</version >
41
- <scope >test</scope >
42
- </dependency >
43
37
<dependency >
44
38
<groupId >org.junit.jupiter</groupId >
45
39
<artifactId >junit-jupiter-engine</artifactId >
You can’t perform that action at this time.
0 commit comments