Skip to content

Commit 10c5c9d

Browse files
API-7197: Add unit tests for null shipping carrier / tracking number in create/update order event
1 parent 072653d commit 10c5c9d

File tree

8 files changed

+680
-12
lines changed

8 files changed

+680
-12
lines changed

src/test/java/com/siftscience/AddItemToCartEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public void testAddItemToCart() throws Exception {
7676

7777
// Verify the response.
7878
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
79+
Assert.assertNotNull(siftResponse.getBody());
7980
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
80-
Assert.assertNotNull(response.getBody());
8181
JSONAssert.assertEquals(response.getBody().readUtf8(),
8282
siftResponse.getBody().toJson(), true);
8383

src/test/java/com/siftscience/AddPromotionEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public void testAddPromotion() throws Exception {
7979

8080
// Verify the response.
8181
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
82+
Assert.assertNotNull(siftResponse.getBody());
8283
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
83-
Assert.assertNotNull(response.getBody());
8484
JSONAssert.assertEquals(response.getBody().readUtf8(),
8585
siftResponse.getBody().toJson(), true);
8686

src/test/java/com/siftscience/ContentStatusEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ public void testContentStatus() throws Exception {
6363

6464
// Verify the response.
6565
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
66+
Assert.assertNotNull(siftResponse.getBody());
6667
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
67-
Assert.assertNotNull(response.getBody());
6868
JSONAssert.assertEquals(response.getBody().readUtf8(),
6969
siftResponse.getBody().toJson(), true);
7070

src/test/java/com/siftscience/CreateOrderEventTest.java

Lines changed: 337 additions & 3 deletions
Large diffs are not rendered by default.

src/test/java/com/siftscience/FlagContentEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public void testFlagContent() throws Exception {
6666

6767
// Verify the response.
6868
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
69+
Assert.assertNotNull(siftResponse.getBody());
6970
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
70-
Assert.assertNotNull(response.getBody());
7171
JSONAssert.assertEquals(response.getBody().readUtf8(),
7272
siftResponse.getBody().toJson(), true);
7373

src/test/java/com/siftscience/RemoveItemFromCartEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public void testRemoveItemFromCart() throws Exception {
7575

7676
// Verify the response.
7777
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
78+
Assert.assertNotNull(siftResponse.getBody());
7879
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
79-
Assert.assertNotNull(response.getBody());
8080
JSONAssert.assertEquals(response.getBody().readUtf8(),
8181
siftResponse.getBody().toJson(), true);
8282

src/test/java/com/siftscience/UpdateOrderEventTest.java

Lines changed: 337 additions & 3 deletions
Large diffs are not rendered by default.

src/test/java/com/siftscience/UpdatePasswordEventTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public void testUpdatePassword() throws Exception {
8686

8787
// Verify the response.
8888
Assert.assertEquals(HTTP_OK, siftResponse.getHttpStatusCode());
89+
Assert.assertNotNull(siftResponse.getBody());
8990
Assert.assertEquals(0, (int) siftResponse.getBody().getStatus());
90-
Assert.assertNotNull(response.getBody());
9191
JSONAssert.assertEquals(response.getBody().readUtf8(), siftResponse.getBody().toJson(), true);
9292

9393
server.shutdown();

0 commit comments

Comments
 (0)