11package com .qdesrame .openapi .test ;
22
33import static com .qdesrame .openapi .test .TestUtils .assertOpenApiAreEquals ;
4+ import static org .assertj .core .api .Assertions .assertThat ;
45
56import com .qdesrame .openapi .diff .OpenApiCompare ;
67import com .qdesrame .openapi .diff .model .ChangedOpenApi ;
1112import java .io .FileWriter ;
1213import java .io .IOException ;
1314import java .util .List ;
14- import org .junit .Assert ;
15- import org .junit .Test ;
15+ import org .junit .jupiter .api .Test ;
1616
1717public class OpenApiDiffTest {
1818
19+ final String SWAGGER_V2_HTTP = "http://petstore.swagger.io/v2/swagger.json" ;
1920 private final String OPENAPI_DOC1 = "petstore_v2_1.yaml" ;
2021 private final String OPENAPI_DOC2 = "petstore_v2_2.yaml" ;
2122 private final String OPENAPI_EMPTY_DOC = "petstore_v2_empty.yaml" ;
22- final String SWAGGER_V2_HTTP = "http://petstore.swagger.io/v2/swagger.json" ;
2323
2424 @ Test
2525 public void testEqual () {
@@ -44,9 +44,9 @@ public void testNewApi() {
4444 } catch (IOException e ) {
4545 e .printStackTrace ();
4646 }
47- Assert . assertTrue (newEndpoints . size () > 0 );
48- Assert . assertTrue (missingEndpoints .isEmpty () );
49- Assert . assertTrue (changedEndPoints .isEmpty () );
47+ assertThat (newEndpoints ). isNotEmpty ( );
48+ assertThat (missingEndpoints ) .isEmpty ();
49+ assertThat (changedEndPoints ) .isEmpty ();
5050 }
5151
5252 @ Test
@@ -67,9 +67,9 @@ public void testDeprecatedApi() {
6767 } catch (IOException e ) {
6868 e .printStackTrace ();
6969 }
70- Assert . assertTrue (newEndpoints .isEmpty () );
71- Assert . assertTrue (missingEndpoints . size () > 0 );
72- Assert . assertTrue (changedEndPoints .isEmpty () );
70+ assertThat (newEndpoints ) .isEmpty ();
71+ assertThat (missingEndpoints ). isNotEmpty ( );
72+ assertThat (changedEndPoints ) .isEmpty ();
7373 }
7474
7575 @ Test
@@ -87,7 +87,7 @@ public void testDiff() {
8787 } catch (IOException e ) {
8888 e .printStackTrace ();
8989 }
90- Assert . assertFalse (changedEndPoints . isEmpty () );
90+ assertThat (changedEndPoints ). isNotEmpty ( );
9191 }
9292
9393 @ Test
0 commit comments