diff --git a/src/test/java/com/bandwidth/sdk/unit/api/ConferencesApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/ConferencesApiTest.java index 77ebefa2..cf3b33d3 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/ConferencesApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/ConferencesApiTest.java @@ -88,7 +88,7 @@ public void testGetConferenceMember() throws ApiException { assertThat(response.getData(), instanceOf(ConferenceMember.class)); assertThat(response.getData().getCallId().length(), is(47)); assertThat(response.getData().getConferenceId().length(), is(50)); - assertThat(response.getData().getMemberUrl(), instanceOf(String.class)); // should be a URI + assertThat(response.getData().getMemberUrl(), instanceOf(URI.class)); assertThat(response.getData().getMute(), instanceOf(Boolean.class)); assertThat(response.getData().getHold(), instanceOf(Boolean.class)); assertThat(response.getData().getCallIdsToCoach(), instanceOf(List.class)); diff --git a/src/test/java/com/bandwidth/sdk/unit/models/AnswerCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/AnswerCallbackTest.java index d56c7cd3..e8655730 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/AnswerCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/AnswerCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.AnswerCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -35,7 +36,7 @@ public class AnswerCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -121,7 +122,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BridgeCompleteCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BridgeCompleteCallbackTest.java index bd7da5a3..13cf0139 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/BridgeCompleteCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/BridgeCompleteCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.BridgeCompleteCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class BridgeCompleteCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -120,7 +121,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BridgeTargetCompleteCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BridgeTargetCompleteCallbackTest.java index 97a062cd..9a52ef97 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/BridgeTargetCompleteCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/BridgeTargetCompleteCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.BridgeTargetCompleteCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class BridgeTargetCompleteCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -117,7 +118,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/ConferenceMemberTest.java b/src/test/java/com/bandwidth/sdk/unit/models/ConferenceMemberTest.java index 3fb8e288..c9abbf64 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/ConferenceMemberTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/ConferenceMemberTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.util.List; import java.util.Arrays; import java.util.ArrayList; @@ -29,7 +30,7 @@ public class ConferenceMemberTest { private final ConferenceMember model = new ConferenceMember() .callId("callId") .conferenceId("conferenceId") - .memberUrl("memberUrl") + .memberUrl(URI.create("https://bandwidth.com")) .mute(true) .hold(true) .callIdsToCoach(new ArrayList(Arrays.asList("callIdsToCoach"))); @@ -63,7 +64,7 @@ public void conferenceIdTest() { */ @Test public void memberUrlTest() { - assertThat(model.getMemberUrl(), instanceOf(String.class)); + assertThat(model.getMemberUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/DisconnectCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/DisconnectCallbackTest.java index 15056651..5d05e41f 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/DisconnectCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/DisconnectCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.DisconnectCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class DisconnectCallbackTest { .to("to") .callId("callId") .direction(CallDirectionEnum.INBOUND) - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -121,7 +122,7 @@ public void directionTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/DtmfCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/DtmfCallbackTest.java index 1ec95d38..a5925616 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/DtmfCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/DtmfCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.DtmfCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -35,7 +36,7 @@ public class DtmfCallbackTest { .callId("callId") .direction(CallDirectionEnum.INBOUND) .digit("digit") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -129,7 +130,7 @@ public void digitTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/GatherCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/GatherCallbackTest.java index 31195da5..056968c2 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/GatherCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/GatherCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.GatherCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -35,7 +36,7 @@ public class GatherCallbackTest { .direction(CallDirectionEnum.INBOUND) .callId("callId") .digits("digits") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -130,7 +131,7 @@ public void digitsTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java index d92dac83..b8da33ec 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/InitiateCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.InitiateCallback; import com.bandwidth.sdk.model.Diversion; @@ -36,7 +37,7 @@ public class InitiateCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .startTime(OffsetDateTime.now()) .diversion(new Diversion()) .stirShaken(new StirShaken()); @@ -118,7 +119,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/MachineDetectionCompleteCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/MachineDetectionCompleteCallbackTest.java index 96393350..bf333c2f 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/MachineDetectionCompleteCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/MachineDetectionCompleteCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.MachineDetectionCompleteCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -35,7 +36,7 @@ public class MachineDetectionCompleteCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -119,7 +120,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/RecordingAvailableCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/RecordingAvailableCallbackTest.java index 72d9c2ed..8676243f 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/RecordingAvailableCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/RecordingAvailableCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.RecordingAvailableCallback; @@ -36,7 +37,7 @@ public class RecordingAvailableCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .parentCallId("parentCallId") .recordingId("recordingId") .mediaUrl(URI.create("https://example.com")) @@ -128,7 +129,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/RecordingCompleteCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/RecordingCompleteCallbackTest.java index b9444b42..5a176b86 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/RecordingCompleteCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/RecordingCompleteCallbackTest.java @@ -36,7 +36,7 @@ public class RecordingCompleteCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("https://bandwidth.com") // should be a URI, need to update the spec + .callUrl(URI.create("https://bandwidth.com")) .parentCallId("parentCallId") .recordingId("recordingId") .mediaUrl(URI.create("https://bandwidth.com")) @@ -129,7 +129,7 @@ public void callIdTest() { @Test public void callUrlTest() { // assertThat(model.getCallUrl(), instanceOf(URI.class)); - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/RedirectCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/RedirectCallbackTest.java index 6918c7ed..a04f6662 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/RedirectCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/RedirectCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.RedirectCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class RedirectCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .parentCallId("parentCallId") .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) @@ -120,7 +121,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TranscriptionAvailableCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TranscriptionAvailableCallbackTest.java index 2af84d6f..eb59b826 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/TranscriptionAvailableCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/TranscriptionAvailableCallbackTest.java @@ -37,7 +37,7 @@ public class TranscriptionAvailableCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") // should be URI - .callUrl("https://example.com") + .callUrl(URI.create("https://bandwidth.com")) .mediaUrl(URI.create("https://example.com")) .parentCallId("parentCallId") .recordingId("recordingId") @@ -129,7 +129,7 @@ public void callIdTest() { @Test public void callUrlTest() { // assertThat(model.getCallUrl(), instanceOf(URI.class)); - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TransferAnswerCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TransferAnswerCallbackTest.java index acec0148..1394db0e 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/TransferAnswerCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/TransferAnswerCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.TransferAnswerCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class TransferAnswerCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") // Should be URI + .callUrl(URI.create("https://bandwidth.com")) // Should be URI .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -119,7 +120,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TransferCompleteCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TransferCompleteCallbackTest.java index ed50bbd1..db116516 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/TransferCompleteCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/TransferCompleteCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.TransferCompleteCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class TransferCompleteCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") // should be uri + .callUrl(URI.create("https://bandwidth.com")) // should be uri .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) .answerTime(OffsetDateTime.now()) @@ -122,7 +123,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TransferDisconnectCallbackTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TransferDisconnectCallbackTest.java index 38c111e8..7eb52e51 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/TransferDisconnectCallbackTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/TransferDisconnectCallbackTest.java @@ -14,6 +14,7 @@ import org.junit.jupiter.api.Test; +import java.net.URI; import java.time.OffsetDateTime; import com.bandwidth.sdk.model.TransferDisconnectCallback; import com.bandwidth.sdk.model.CallDirectionEnum; @@ -34,7 +35,7 @@ public class TransferDisconnectCallbackTest { .to("to") .direction(CallDirectionEnum.INBOUND) .callId("callId") - .callUrl("callUrl") + .callUrl(URI.create("https://bandwidth.com")) .parentCallId("parentCallId") .enqueuedTime(OffsetDateTime.now()) .startTime(OffsetDateTime.now()) @@ -124,7 +125,7 @@ public void callIdTest() { */ @Test public void callUrlTest() { - assertThat(model.getCallUrl(), instanceOf(String.class)); + assertThat(model.getCallUrl(), instanceOf(URI.class)); } /** diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java index 682b665d..301fd75a 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java @@ -58,7 +58,7 @@ public class TransferVerbTest { public void transferVerbWorks() throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); String expectedSipUriBxml = "sip@bw.com"; - String expectedPhoneNumberBxml = "+19195551234"; // + String expectedPhoneNumberBxml = "+19195551234"; assertThat(new Bxml().with(transfer1).toBxml(jaxbContext), is(expectedSipUriBxml)); assertThat(new Bxml().with(transfer2).toBxml(jaxbContext), is(expectedPhoneNumberBxml));