Skip to content

Commit

Permalink
MSLRES-4816 Fix ITs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustav committed Jan 27, 2022
1 parent 6034f89 commit 8790604
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/test/java/com/sinch/xms/ApiConnectionIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
import com.sinch.xms.api.PagedGroupResult;
import com.sinch.xms.api.PagedInboundsResult;
import com.sinch.xms.api.RecipientDeliveryReport;
import com.sinch.xms.api.ReportType;
import com.sinch.xms.api.Tags;
import com.sinch.xms.api.TagsUpdate;
import java.io.IOException;
Expand Down Expand Up @@ -152,6 +153,8 @@ public void canCreateBinaryBatch() throws Exception {
.body(request.body())
.udh(request.udh())
.canceled(false)
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.id(batchId)
.createdAt(time)
.modifiedAt(time)
Expand Down Expand Up @@ -194,6 +197,8 @@ public void canCreateTextBatch() throws Exception {

MtBatchTextSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender(request.sender())
.recipients(request.recipients())
.body(request.body())
Expand Down Expand Up @@ -246,6 +251,8 @@ public void canCreateTextBatchWithSubstitutions() throws Exception {

MtBatchTextSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender(request.sender())
.recipients(request.recipients())
.body(request.body())
Expand Down Expand Up @@ -533,6 +540,8 @@ public void canReplaceBinaryBatch() throws Exception {
.recipients(request.recipients())
.body(request.body())
.udh(request.udh())
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.canceled(false)
.id(batchId)
.createdAt(time)
Expand Down Expand Up @@ -576,6 +585,8 @@ public void canReplaceTextBatch() throws Exception {

MtBatchTextSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender(request.sender())
.recipients(request.recipients())
.body(request.body())
Expand Down Expand Up @@ -622,6 +633,8 @@ public void canUpdateSimpleTextBatch() throws Exception {

MtBatchTextSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender(request.sender())
.addRecipient("123")
.body(request.body())
Expand Down Expand Up @@ -675,6 +688,8 @@ public void canUpdateSimpleBinaryBatch() throws Exception {
.addRecipient("123")
.body(request.body())
.udh((byte) 1, (byte) 0xff)
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.canceled(false)
.id(batchId)
.createdAt(time)
Expand Down Expand Up @@ -712,6 +727,8 @@ public void canFetchTextBatch() throws Exception {

final MtBatchSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender("12345")
.addRecipient("123456789", "987654321")
.body("Hello, world!")
Expand Down Expand Up @@ -750,6 +767,8 @@ public void canFetchTextBatchAsync() throws Exception {

final MtBatchSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender("12345")
.addRecipient("123456789", "987654321")
.body("Hello, world!")
Expand Down Expand Up @@ -801,6 +820,8 @@ public void canFetchBinaryBatch() throws Exception {
.addRecipient("123456789", "987654321")
.body((byte) 0xf0, (byte) 0x0f)
.udh((byte) 0x50, (byte) 0x05)
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.canceled(false)
.id(batchId)
.createdAt(time)
Expand Down Expand Up @@ -1018,6 +1039,8 @@ public void canCancelBatch() throws Exception {

MtBatchSmsResult expected =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender("12345")
.addRecipient("123456789", "987654321")
.body("Hello, world!")
Expand Down Expand Up @@ -1058,6 +1081,8 @@ public void canCancelBatchConcurrently() throws Exception {
// Set up the first request (the one that will be delayed).
MtBatchSmsResult expected1 =
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.sender("12345")
.addRecipient("123456789", "987654321")
.body("Hello, world!")
Expand Down Expand Up @@ -1086,6 +1111,8 @@ public void canCancelBatchConcurrently() throws Exception {
.addRecipient("123456789", "987654321")
.body("Hello, world!".getBytes())
.udh((byte) 1)
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.canceled(true)
.id(TestUtils.freshBatchId())
.createdAt(OffsetDateTime.now())
Expand Down Expand Up @@ -1252,6 +1279,8 @@ public void canIterateOverPages() throws Exception {
.totalSize(2)
.addContent(
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.id(TestUtils.freshBatchId())
.body("body")
.canceled(false)
Expand All @@ -1274,9 +1303,13 @@ public void canIterateOverPages() throws Exception {
.body((byte) 0)
.udh((byte) 1)
.canceled(false)
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.build())
.addContent(
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.id(TestUtils.freshBatchId())
.body("body")
.canceled(false)
Expand Down Expand Up @@ -1329,6 +1362,8 @@ public void canIterateOverBatchesWithTwoPages() throws Exception {
.totalSize(3)
.addContent(
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.id(TestUtils.freshBatchId())
.body("body")
.canceled(false)
Expand All @@ -1351,9 +1386,13 @@ public void canIterateOverBatchesWithTwoPages() throws Exception {
.body((byte) 0)
.udh((byte) 1)
.canceled(false)
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.build())
.addContent(
MtBatchTextSmsResult.builder()
.flashMessage(false)
.deliveryReport(ReportType.NONE)
.id(TestUtils.freshBatchId())
.body("body")
.canceled(false)
Expand Down

0 comments on commit 8790604

Please sign in to comment.