Skip to content

Commit

Permalink
API-7197: Add unit tests for null shipping carrier / tracking number …
Browse files Browse the repository at this point in the history
…in create/update order event
  • Loading branch information
advornichenko-sift committed Jul 6, 2023
1 parent 072653d commit 10c5c9d
Show file tree
Hide file tree
Showing 8 changed files with 680 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/AddItemToCartEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public void testAddItemToCart() throws Exception {

// Verify the response.
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
Assert.assertNotNull(siftResponse.getBody());
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
Assert.assertNotNull(response.getBody());
JSONAssert.assertEquals(response.getBody().readUtf8(),
siftResponse.getBody().toJson(), true);

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/AddPromotionEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public void testAddPromotion() throws Exception {

// Verify the response.
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
Assert.assertNotNull(siftResponse.getBody());
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
Assert.assertNotNull(response.getBody());
JSONAssert.assertEquals(response.getBody().readUtf8(),
siftResponse.getBody().toJson(), true);

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/ContentStatusEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public void testContentStatus() throws Exception {

// Verify the response.
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
Assert.assertNotNull(siftResponse.getBody());
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
Assert.assertNotNull(response.getBody());
JSONAssert.assertEquals(response.getBody().readUtf8(),
siftResponse.getBody().toJson(), true);

Expand Down
340 changes: 337 additions & 3 deletions src/test/java/com/siftscience/CreateOrderEventTest.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/FlagContentEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public void testFlagContent() throws Exception {

// Verify the response.
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
Assert.assertNotNull(siftResponse.getBody());
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
Assert.assertNotNull(response.getBody());
JSONAssert.assertEquals(response.getBody().readUtf8(),
siftResponse.getBody().toJson(), true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public void testRemoveItemFromCart() throws Exception {

// Verify the response.
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
Assert.assertNotNull(siftResponse.getBody());
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
Assert.assertNotNull(response.getBody());
JSONAssert.assertEquals(response.getBody().readUtf8(),
siftResponse.getBody().toJson(), true);

Expand Down
340 changes: 337 additions & 3 deletions src/test/java/com/siftscience/UpdateOrderEventTest.java

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/test/java/com/siftscience/UpdatePasswordEventTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ public void testUpdatePassword() throws Exception {

// Verify the response.
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
Assert.assertNotNull(siftResponse.getBody());
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
Assert.assertNotNull(response.getBody());
JSONAssert.assertEquals(response.getBody().readUtf8(), siftResponse.getBody().toJson(), true);

server.shutdown();
Expand Down

0 comments on commit 10c5c9d

Please sign in to comment.