1010import org .junit .Test ;
1111
1212import com .imsweb .seerapi .client .SeerApi ;
13- import com .imsweb .seerapi .client .shared .Version ;
1413
15- import static org .junit .Assert .assertEquals ;
16- import static org .junit .Assert .assertFalse ;
17- import static org .junit .Assert .assertNotNull ;
18- import static org .junit .Assert .assertNull ;
19- import static org .junit .Assert .assertTrue ;
14+ import static org .assertj .core .api .Assertions .assertThat ;
2015
2116public class SurgeryTest {
2217
@@ -27,43 +22,33 @@ public static void setup() {
2722 _SURGERY = new SeerApi .Builder ().connect ().surgery ();
2823 }
2924
30- @ Test
31- public void testSiteSpecificSurgeryVersions () throws IOException {
32- List <Version > versions = _SURGERY .versions ().execute ().body ();
33-
34- assertTrue (versions .size () > 0 );
35- for (Version version : versions ) {
36- assertTrue (version .getVersion ().length () > 0 );
37- assertTrue (version .getCount () > 0 );
38- }
39- }
40-
4125 @ Test
4226 public void testSiteSpecificSurgeryTables () throws IOException {
4327 List <String > titles = _SURGERY .tables ("2014" ).execute ().body ();
4428
45- assertTrue (titles . size () > 0 );
46- assertTrue (titles . contains ("Oral Cavity" ) );
29+ assertThat (titles ). isNotEmpty ( );
30+ assertThat (titles ). containsAnyOf ("Oral Cavity" );
4731 }
4832
4933 @ Test
5034 public void testSiteSpecificSurgeryTable () throws IOException {
5135 SurgeryTable table = _SURGERY .table ("2014" , "Oral Cavity" , null , null ).execute ().body ();
5236
53- assertNotNull (table );
54- assertEquals ("Oral Cavity" , table .getTitle ());
55- assertNotNull (table .getSiteInclusions ());
56- assertNotNull (table .getHistExclusions ());
57- assertNull (table .getHistInclusions ());
58- assertNotNull (table .getPreNote ());
59- assertNull (table .getPostNote ());
37+ assertThat (table ).isNotNull ();
38+ assertThat (table .getTitle ()).isEqualTo ("Oral Cavity" );
39+ assertThat (table .getSiteInclusions ()).isNotNull ();
40+ assertThat (table .getHistExclusions ()).isNotNull ();
41+ assertThat (table .getHistInclusions ()).isNull ();
42+ assertThat (table .getPreNote ()).isNotNull ();
43+ assertThat (table .getPostNote ()).isNull ();
44+
6045 SurgeryRow row = table .getRows ().get (0 );
61- assertEquals ( "00" , row .getCode ());
62- assertNotNull (row .getDescription ());
63- assertEquals ( Integer . valueOf ( 0 ), row . getLevel ( ));
64- assertFalse (row .getLineBreak ());
46+ assertThat ( row .getCode ()). isEqualTo ( "00" );
47+ assertThat (row .getDescription ()). isNotNull ( );
48+ assertThat ( row . getLevel ()). isEqualTo ( Integer . valueOf ( 0 ));
49+ assertThat (row .getLineBreak ()). isFalse ( );
6550
6651 table = _SURGERY .table ("2014" , null , "C001" , "8000" ).execute ().body ();
67- assertEquals ( "Oral Cavity" , table .getTitle ());
52+ assertThat ( table .getTitle ()). isEqualTo ( "Oral Cavity" );
6853 }
6954}
0 commit comments