Skip to content

Commit

Permalink
feature: PR's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JPPortier committed Feb 28, 2024
1 parent 1f0d3ed commit 0c7de28
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions client/src/test/java/com/sinch/sdk/SinchClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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 =
Expand Down

0 comments on commit 0c7de28

Please sign in to comment.