-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from jackthorley/Unicode-Character-Send-Functio…
…nality-When-Sending-SMS Add characterSet overload for SMSMessageRequest for messaging service
- Loading branch information
Showing
17 changed files
with
113 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/main/java/esendex/sdk/java/model/transfer/message/MessageRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/esendex/sdk/java/model/types/CharacterSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package esendex.sdk.java.model.types; | ||
|
||
public enum CharacterSet { | ||
|
||
AUTO ("Auto"), | ||
GSM ("GSM"), | ||
UNICODE ("Unicode"); | ||
|
||
private String representation; | ||
|
||
private CharacterSet(String representation) { | ||
this.representation = representation; | ||
} | ||
|
||
/** | ||
* To string. | ||
* @return the string {@inheritDoc} | ||
*/ | ||
public String toString() { | ||
return representation; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...java/com/esendex/java/sdk/integration/messagingservice/SendServiceSingleUnicodeSMSIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.esendex.java.sdk.integration.messagingservice; | ||
|
||
import com.esendex.java.sdk.BaseTest; | ||
import esendex.sdk.java.EsendexException; | ||
import esendex.sdk.java.model.domain.request.SmsMessageRequest; | ||
import esendex.sdk.java.model.domain.response.MessageResultResponse; | ||
import esendex.sdk.java.model.types.CharacterSet; | ||
import esendex.sdk.java.service.MessagingService; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertNotNull; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
public class SendServiceSingleUnicodeSMSIT extends BaseTest { | ||
|
||
private static MessageResultResponse resultResponse; | ||
|
||
@BeforeClass | ||
public static void whenSendingASingleMessage() throws EsendexException { | ||
|
||
MessagingService messagingService = getFactory().getMessagingService(); | ||
|
||
resultResponse = messagingService.sendMessage(ACCOUNT, new SmsMessageRequest(DESTINATION_NUMBER, "\u1F43", CharacterSet.UNICODE)); | ||
} | ||
|
||
@Test | ||
public void thenABatchIdIsReturned() { | ||
assertNotNull(resultResponse.getBatchId()); | ||
} | ||
|
||
@Test | ||
public void thenAMessageHeaderIsReturned() { | ||
assertTrue(resultResponse.getMessageIds().size() == 1); | ||
assertNotNull(resultResponse.getMessageIds().get(0)); | ||
} | ||
} |