1818import static com .google .code .beanmatchers .BeanMatchers .hasValidBeanConstructor ;
1919import static com .google .code .beanmatchers .BeanMatchers .hasValidGettersAndSetters ;
2020import static org .junit .jupiter .api .Assertions .assertEquals ;
21+ import static org .junit .jupiter .api .Assertions .assertFalse ;
2122import static org .junit .jupiter .api .Assertions .assertNotNull ;
2223import static org .junit .jupiter .api .Assertions .assertNull ;
2324import static org .junit .jupiter .api .Assertions .assertTrue ;
@@ -54,7 +55,7 @@ void testDiseasePrimarySites() throws IOException {
5455 List <PrimarySite > sites = _DISEASE .primarySites ().execute ().body ();
5556
5657 assertNotNull (sites );
57- assertTrue (sites .size () > 0 );
58+ assertFalse (sites .isEmpty () );
5859 assertEquals ("C000" , sites .get (0 ).getValue ());
5960 assertEquals ("External upper lip" , sites .get (0 ).getLabel ());
6061 }
@@ -64,7 +65,7 @@ void testDiseasePrimarySiteCode() throws IOException {
6465 List <PrimarySite > sites = _DISEASE .primarySiteCode ("C021" ).execute ().body ();
6566
6667 assertNotNull (sites );
67- assertTrue (sites .size () > 0 );
68+ assertFalse (sites .isEmpty () );
6869 assertEquals ("C021" , sites .get (0 ).getValue ());
6970 assertEquals ("Border of tongue" , sites .get (0 ).getLabel ());
7071 }
@@ -74,7 +75,7 @@ void testDiseaseSiteCateogires() throws IOException {
7475 List <SiteCategory > categories = _DISEASE .siteCategories ().execute ().body ();
7576
7677 assertNotNull (categories );
77- assertTrue (categories .size () > 0 );
78+ assertFalse (categories .isEmpty () );
7879 assertEquals ("head-and-neck" , categories .get (0 ).getId ());
7980 assertEquals ("Head and Neck" , categories .get (0 ).getLabel ());
8081 assertEquals (2 , categories .get (0 ).getSites ().size ());
@@ -91,7 +92,7 @@ void testDiseaseById() throws IOException {
9192 assertEquals ("Pure erythroid leukemia" , disease .getName ());
9293 assertEquals (Disease .Type .HEMATO , disease .getType ());
9394 assertEquals ("9840/3" , disease .getIcdO3Morphology ());
94- assertTrue (disease .getSamePrimaries ().size () > 0 );
95+ assertFalse (disease .getSamePrimaries ().isEmpty () );
9596
9697 assertNotNull (disease .getId ());
9798 assertEquals ("latest" , disease .getVersion ());
@@ -115,7 +116,7 @@ void testDiseaseById() throws IOException {
115116 assertEquals (1 , disease .getAbstractorNote ().size ());
116117 assertEquals (2 , disease .getTreatment ().size ());
117118 assertNull (disease .getGenetics ());
118- assertTrue (disease .getAlternateName ().size () > 0 );
119+ assertFalse (disease .getAlternateName ().isEmpty () );
119120 assertEquals ("Acute erythremia" , disease .getAlternateName ().get (0 ).getValue ());
120121 assertTrue (disease .getIcdO2Morphology ().contains ("9840/3" ));
121122 assertTrue (disease .getIcdO1Morphology ().contains ("9840/3" ));
@@ -228,7 +229,7 @@ void testDiseaseSearchIterate() throws IOException {
228229 DiseaseSearchResults results = _DISEASE .search ("latest" , search .paramMap ()).execute ().body ();
229230 assertNotNull (results );
230231 assertTrue (results .getTotal () > 0 );
231- assertTrue (results .getResults ().size () > 0 );
232+ assertFalse (results .getResults ().isEmpty () );
232233
233234 // the first time through, set the total
234235 if (total == null )
@@ -276,8 +277,8 @@ void testDiseaseChangelog() throws IOException {
276277 assertEquals ("Initial migration" , changelog .getDescription ());
277278
278279 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 () );
281282 assertNull (entry .getOldVersion ());
282283 assertNull (entry .getNewVersion ());
283284 }
0 commit comments