Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SMadani committed Sep 22, 2024
1 parent 28c4c42 commit b2a72a4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

# [8.11.0] - 2024-09-??
# [8.11.0] - 2024-09-2?
- Added RCS channel to Messages API
- Added `ackInboundMessage` and `revokeOutboundMessage` methods to `MessagesClient`
- Fixed `viber_service` deserialization in `com.vonage.client.messages.Channel`
- Added `thumbnail_url`, `video_url`, `image_url`, `ctwa_clid` and `media_type` to WhatsApp `Referral`
- Added `_self.href` property to `com.vonage.client.messages.InboundMessage`
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/vonage/client/ApiRegion.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ public String toString() {
return name().toLowerCase().replace("_", "-");
}

/**
* Converts a string representation of a region to the corresponding enum value.
*
* @param region The region as a string.
* @return The region enum, or {@code null} if the input is {@code null}.
*/
@JsonCreator
public static ApiRegion fromString(String region) {
if (region == null) return null;
Expand Down
1 change: 1 addition & 0 deletions src/test/java/com/vonage/client/HttpConfigTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ static void assertDefaults(HttpConfig config) {
assertEquals(EXPECTED_DEFAULT_REST_BASE_URI, config.getRestBaseUri());
assertEquals(EXPECTED_DEFAULT_API_EU_BASE_URI, config.getApiEuBaseUri());
assertEquals(EXPECTED_DEFAULT_VIDEO_BASE_URI, config.getVideoBaseUri());
assertEquals(URI.create(EXPECTED_DEFAULT_API_EU_BASE_URI), config.getRegionalBaseUri(ApiRegion.API_EU));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import com.vonage.client.messages.mms.MmsAudioRequest;
import com.vonage.client.messages.mms.MmsImageRequest;
import com.vonage.client.messages.mms.MmsVcardRequest;
import com.vonage.client.messages.mms.MmsVideoRequest;
import com.vonage.client.messages.rcs.*;
import com.vonage.client.messages.sms.SmsTextRequest;
import com.vonage.client.messages.viber.ViberFileRequest;
Expand Down Expand Up @@ -119,7 +120,7 @@ public void testSendMmsSuccess() throws Exception {
assertResponse(MmsVcardRequest.builder().url(VCARD));
assertResponse(MmsImageRequest.builder().url(IMAGE));
assertResponse(MmsAudioRequest.builder().url(AUDIO));
assertResponse(MmsAudioRequest.builder().url(VIDEO));
assertResponse(MmsVideoRequest.builder().url(VIDEO));
}

@Test
Expand Down

0 comments on commit b2a72a4

Please sign in to comment.