Skip to content

Commit

Permalink
update tests for String -> URI change
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoegel committed Sep 3, 2024
1 parent 856a179 commit dda40b1
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -121,7 +122,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -120,7 +121,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -117,7 +118,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<String>(Arrays.asList("callIdsToCoach")));
Expand Down Expand Up @@ -63,7 +64,7 @@ public void conferenceIdTest() {
*/
@Test
public void memberUrlTest() {
assertThat(model.getMemberUrl(), instanceOf(String.class));
assertThat(model.getMemberUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -121,7 +122,7 @@ public void directionTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -129,7 +130,7 @@ public void digitTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -130,7 +131,7 @@ public void digitsTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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());
Expand Down Expand Up @@ -118,7 +119,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -119,7 +120,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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"))
Expand Down Expand Up @@ -128,7 +129,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down Expand Up @@ -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));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -120,7 +121,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -119,7 +120,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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())
Expand Down Expand Up @@ -122,7 +123,7 @@ public void callIdTest() {
*/
@Test
public void callUrlTest() {
assertThat(model.getCallUrl(), instanceOf(String.class));
assertThat(model.getCallUrl(), instanceOf(URI.class));
}

/**
Expand Down
Loading

0 comments on commit dda40b1

Please sign in to comment.