18
18
import static com .google .code .beanmatchers .BeanMatchers .hasValidBeanConstructor ;
19
19
import static com .google .code .beanmatchers .BeanMatchers .hasValidGettersAndSetters ;
20
20
import static org .junit .jupiter .api .Assertions .assertEquals ;
21
+ import static org .junit .jupiter .api .Assertions .assertFalse ;
21
22
import static org .junit .jupiter .api .Assertions .assertNotNull ;
22
23
import static org .junit .jupiter .api .Assertions .assertNull ;
23
24
import static org .junit .jupiter .api .Assertions .assertTrue ;
@@ -54,7 +55,7 @@ void testDiseasePrimarySites() throws IOException {
54
55
List <PrimarySite > sites = _DISEASE .primarySites ().execute ().body ();
55
56
56
57
assertNotNull (sites );
57
- assertTrue (sites .size () > 0 );
58
+ assertFalse (sites .isEmpty () );
58
59
assertEquals ("C000" , sites .get (0 ).getValue ());
59
60
assertEquals ("External upper lip" , sites .get (0 ).getLabel ());
60
61
}
@@ -64,7 +65,7 @@ void testDiseasePrimarySiteCode() throws IOException {
64
65
List <PrimarySite > sites = _DISEASE .primarySiteCode ("C021" ).execute ().body ();
65
66
66
67
assertNotNull (sites );
67
- assertTrue (sites .size () > 0 );
68
+ assertFalse (sites .isEmpty () );
68
69
assertEquals ("C021" , sites .get (0 ).getValue ());
69
70
assertEquals ("Border of tongue" , sites .get (0 ).getLabel ());
70
71
}
@@ -74,7 +75,7 @@ void testDiseaseSiteCateogires() throws IOException {
74
75
List <SiteCategory > categories = _DISEASE .siteCategories ().execute ().body ();
75
76
76
77
assertNotNull (categories );
77
- assertTrue (categories .size () > 0 );
78
+ assertFalse (categories .isEmpty () );
78
79
assertEquals ("head-and-neck" , categories .get (0 ).getId ());
79
80
assertEquals ("Head and Neck" , categories .get (0 ).getLabel ());
80
81
assertEquals (2 , categories .get (0 ).getSites ().size ());
@@ -91,7 +92,7 @@ void testDiseaseById() throws IOException {
91
92
assertEquals ("Pure erythroid leukemia" , disease .getName ());
92
93
assertEquals (Disease .Type .HEMATO , disease .getType ());
93
94
assertEquals ("9840/3" , disease .getIcdO3Morphology ());
94
- assertTrue (disease .getSamePrimaries ().size () > 0 );
95
+ assertFalse (disease .getSamePrimaries ().isEmpty () );
95
96
96
97
assertNotNull (disease .getId ());
97
98
assertEquals ("latest" , disease .getVersion ());
@@ -115,7 +116,7 @@ void testDiseaseById() throws IOException {
115
116
assertEquals (1 , disease .getAbstractorNote ().size ());
116
117
assertEquals (2 , disease .getTreatment ().size ());
117
118
assertNull (disease .getGenetics ());
118
- assertTrue (disease .getAlternateName ().size () > 0 );
119
+ assertFalse (disease .getAlternateName ().isEmpty () );
119
120
assertEquals ("Acute erythremia" , disease .getAlternateName ().get (0 ).getValue ());
120
121
assertTrue (disease .getIcdO2Morphology ().contains ("9840/3" ));
121
122
assertTrue (disease .getIcdO1Morphology ().contains ("9840/3" ));
@@ -228,7 +229,7 @@ void testDiseaseSearchIterate() throws IOException {
228
229
DiseaseSearchResults results = _DISEASE .search ("latest" , search .paramMap ()).execute ().body ();
229
230
assertNotNull (results );
230
231
assertTrue (results .getTotal () > 0 );
231
- assertTrue (results .getResults ().size () > 0 );
232
+ assertFalse (results .getResults ().isEmpty () );
232
233
233
234
// the first time through, set the total
234
235
if (total == null )
@@ -276,8 +277,8 @@ void testDiseaseChangelog() throws IOException {
276
277
assertEquals ("Initial migration" , changelog .getDescription ());
277
278
278
279
DiseaseChangelogEntry entry = changelog .getAdds ().get (0 );
279
- assertTrue (entry .getId ().length () > 0 );
280
- assertTrue (entry .getName ().length () > 0 );
280
+ assertFalse (entry .getId ().isEmpty () );
281
+ assertFalse (entry .getName ().isEmpty () );
281
282
assertNull (entry .getOldVersion ());
282
283
assertNull (entry .getNewVersion ());
283
284
}
0 commit comments