99
1010import org .hamcrest .CoreMatchers ;
1111import org .hamcrest .MatcherAssert ;
12- import org .junit .BeforeClass ;
13- import org .junit .Test ;
12+ import org .junit .jupiter . api . BeforeAll ;
13+ import org .junit .jupiter . api . Test ;
1414
1515import com .imsweb .seerapi .client .SeerApi ;
1616import com .imsweb .seerapi .client .publishable .PublishableSearch ;
1717
1818import static com .google .code .beanmatchers .BeanMatchers .hasValidBeanConstructor ;
1919import static com .google .code .beanmatchers .BeanMatchers .hasValidGettersAndSetters ;
20- import static org .junit .Assert .assertEquals ;
21- import static org .junit .Assert .assertNotNull ;
22- import static org .junit .Assert .assertNull ;
23- import static org .junit .Assert .assertTrue ;
20+ import static org .junit .jupiter . api . Assertions .assertEquals ;
21+ import static org .junit .jupiter . api . Assertions .assertNotNull ;
22+ import static org .junit .jupiter . api . Assertions .assertNull ;
23+ import static org .junit .jupiter . api . Assertions .assertTrue ;
2424
25- public class DiseaseTest {
25+ class DiseaseTest {
2626
2727 private static DiseaseService _DISEASE ;
2828
29- @ BeforeClass
29+ @ BeforeAll
3030 public static void setup () {
3131 _DISEASE = new SeerApi .Builder ().connect ().disease ();
3232 }
3333
3434 @ Test
35- public void testDiseaseTypeCategory () {
35+ void testDiseaseTypeCategory () {
3636 assertEquals (Disease .Type .SOLID_TUMOR , Disease .Type .valueOf ("SOLID_TUMOR" ));
3737 }
3838
3939 @ Test
40- public void testDiseaseVersions () throws IOException {
40+ void testDiseaseVersions () throws IOException {
4141 List <DiseaseVersion > versions = _DISEASE .versions ().execute ().body ();
4242
43+ assertNotNull (versions );
4344 assertEquals (1 , versions .size ());
4445 DiseaseVersion version = versions .get (0 );
4546 assertEquals ("latest" , version .getName ());
@@ -49,27 +50,30 @@ public void testDiseaseVersions() throws IOException {
4950 }
5051
5152 @ Test
52- public void testDiseasePrimarySites () throws IOException {
53+ void testDiseasePrimarySites () throws IOException {
5354 List <PrimarySite > sites = _DISEASE .primarySites ().execute ().body ();
5455
56+ assertNotNull (sites );
5557 assertTrue (sites .size () > 0 );
5658 assertEquals ("C000" , sites .get (0 ).getValue ());
5759 assertEquals ("External upper lip" , sites .get (0 ).getLabel ());
5860 }
5961
6062 @ Test
61- public void testDiseasePrimarySiteCode () throws IOException {
63+ void testDiseasePrimarySiteCode () throws IOException {
6264 List <PrimarySite > sites = _DISEASE .primarySiteCode ("C021" ).execute ().body ();
6365
66+ assertNotNull (sites );
6467 assertTrue (sites .size () > 0 );
6568 assertEquals ("C021" , sites .get (0 ).getValue ());
6669 assertEquals ("Border of tongue" , sites .get (0 ).getLabel ());
6770 }
6871
6972 @ Test
70- public void testDiseaseSiteCateogires () throws IOException {
73+ void testDiseaseSiteCateogires () throws IOException {
7174 List <SiteCategory > categories = _DISEASE .siteCategories ().execute ().body ();
7275
76+ assertNotNull (categories );
7377 assertTrue (categories .size () > 0 );
7478 assertEquals ("head-and-neck" , categories .get (0 ).getId ());
7579 assertEquals ("Head and Neck" , categories .get (0 ).getLabel ());
@@ -80,7 +84,7 @@ public void testDiseaseSiteCateogires() throws IOException {
8084
8185 @ SuppressWarnings ("java:S5961" )
8286 @ Test
83- public void testDiseaseById () throws IOException {
87+ void testDiseaseById () throws IOException {
8488 Disease disease = _DISEASE .getById ("latest" , "51f6cf58e3e27c3994bd5408" ).execute ().body ();
8589
8690 assertNotNull (disease );
@@ -141,7 +145,7 @@ public void testDiseaseById() throws IOException {
141145 }
142146
143147 @ Test
144- public void testDiseaseSamePrimary () throws IOException {
148+ void testDiseaseSamePrimary () throws IOException {
145149 SamePrimaries same = _DISEASE .samePrimaries ("latest" , "9870/3" , "9872/3" , "2010" , "2010" ).execute ().body ();
146150
147151 assertNotNull (same );
@@ -163,7 +167,7 @@ public void testDiseaseSamePrimary() throws IOException {
163167 }
164168
165169 @ Test
166- public void testDiseaseSearch () throws IOException {
170+ void testDiseaseSearch () throws IOException {
167171 DiseaseSearch search = new DiseaseSearch ("basophilic" , Disease .Type .HEMATO );
168172
169173 DiseaseSearchResults results = _DISEASE .search ("latest" , search .paramMap ()).execute ().body ();
@@ -212,7 +216,7 @@ public void testDiseaseSearch() throws IOException {
212216 }
213217
214218 @ Test
215- public void testDiseaseSearchIterate () throws IOException {
219+ void testDiseaseSearchIterate () throws IOException {
216220 DiseaseSearch search = new DiseaseSearch ();
217221 search .setOutputType (PublishableSearch .OutputType .FULL );
218222 search .setCount (100 );
@@ -235,7 +239,7 @@ public void testDiseaseSearchIterate() throws IOException {
235239 }
236240
237241 @ Test
238- public void testDiseaseReportability () throws IOException {
242+ void testDiseaseReportability () throws IOException {
239243 Disease partial = new Disease ();
240244
241245 partial .setType (Disease .Type .HEMATO );
@@ -254,7 +258,7 @@ public void testDiseaseReportability() throws IOException {
254258 }
255259
256260 @ Test
257- public void testDiseaseChangelog () throws IOException {
261+ void testDiseaseChangelog () throws IOException {
258262 DiseaseChangelogResults results = _DISEASE .diseaseChangelogs ("latest" , null , "2013-07-30" , 1 ).execute ().body ();
259263
260264 assertNotNull (results );
@@ -279,7 +283,7 @@ public void testDiseaseChangelog() throws IOException {
279283 }
280284
281285 @ Test
282- public void testBeans () {
286+ void testBeans () {
283287 MatcherAssert .assertThat (Disease .class , CoreMatchers .allOf (hasValidBeanConstructor (), hasValidGettersAndSetters ()));
284288 MatcherAssert .assertThat (DiseaseVersion .class , CoreMatchers .allOf (hasValidBeanConstructor (), hasValidGettersAndSetters ()));
285289 MatcherAssert .assertThat (DiseaseChangelog .class , CoreMatchers .allOf (hasValidBeanConstructor (), hasValidGettersAndSetters ()));
0 commit comments