From 0c7de288732decbab346ffbc80f5c92b7d8e5359 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Portier Date: Wed, 28 Feb 2024 18:20:36 +0100 Subject: [PATCH] feature: PR's comment --- .../test/java/com/sinch/sdk/SinchClientTest.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/client/src/test/java/com/sinch/sdk/SinchClientTest.java b/client/src/test/java/com/sinch/sdk/SinchClientTest.java index 6ea229b0..35d6f916 100644 --- a/client/src/test/java/com/sinch/sdk/SinchClientTest.java +++ b/client/src/test/java/com/sinch/sdk/SinchClientTest.java @@ -4,6 +4,7 @@ import com.sinch.sdk.core.utils.StringUtil; import com.sinch.sdk.models.Configuration; +import com.sinch.sdk.models.SMSRegion; import com.sinch.sdk.models.VoiceContext; import com.sinch.sdk.models.VoiceRegion; import org.junit.jupiter.api.Test; @@ -36,11 +37,9 @@ void defaultSmsUrlAvailable() { @Test void defaultSmsRegion() { - Configuration configuration = - Configuration.builder().setKeyId("foo").setKeySecret("foo").setProjectId("foo").build(); + Configuration configuration = Configuration.builder().build(); SinchClient client = new SinchClient(configuration); - System.out.println(client.getConfiguration().getSmsContext().get().getSmsRegion()); - assertNotNull(client.getConfiguration().getSmsContext().get().getSmsRegion()); + assertEquals(SMSRegion.US, client.getConfiguration().getSmsContext().get().getSmsRegion()); } @Test @@ -51,6 +50,14 @@ void defaultVerificationUrlAvailable() { assertNotNull(client.getConfiguration().getVerificationContext().get().getVerificationUrl()); } + @Test + void defaultVoiceRegion() { + Configuration configuration = Configuration.builder().build(); + SinchClient client = new SinchClient(configuration); + assertEquals( + VoiceRegion.GLOBAL, client.getConfiguration().getVoiceContext().get().getVoiceRegion()); + } + @Test void defaultVoiceUrl() { Configuration configuration =