public UnicodeTextSmsMessageTests() { _message = new TextSmsMessage(string.Empty, "00123") { EncodingType = TextEncodingType.Unicode }; }
public async Task Text_with_Numeric_originator() { // ARRANGE Originator originator = Originator.AsPhoneNumber("8888"); var message = new TextSmsMessage("Hello, World!", "0012345") { MaxMessageCount = 1, EncodingType = TextEncodingType.Gsm0338 }; // ACT await _gateway.Send(originator, message); // ASSERT AssertBody(new Dictionary <string, string> { { "username", "MyName" }, { "password", "MyPassword" }, { "originatortype", "numeric" }, { "originator", "8888" }, { "destination", "0012345" }, { "type", "text" }, { "charset", "UTF-8" }, { "text", "Hello, World!" } }); }
public async Task Can_alter_credentials_after_construction() { // ARRANGE var message = new TextSmsMessage("Hello, World!", "0012345") { MaxMessageCount = 1, EncodingType = TextEncodingType.Gsm0338 }; _credentials.UserName = "******"; _credentials.Password = "******"; // ACT await _gateway.Send(null, message); // ASSERT AssertBody(new Dictionary <string, string> { { "username", "NewName" }, { "password", "NewPassword" }, { "destination", "0012345" }, { "type", "text" }, { "charset", "UTF-8" }, { "text", "Hello, World!" } }); }
public async Task Text_with_ten_destinations() { // ARRANGE var message = new TextSmsMessage( "Hello, World!", "0012345", "0023456", "0034567", "0045678", "0056789", "0067890", "0078901", "0089012", "0090123", "0099999") { MaxMessageCount = 1, EncodingType = TextEncodingType.Gsm0338 }; // ACT await _gateway.Send(null, message); // ASSERT AssertBody(new Dictionary <string, string> { { "username", "MyName" }, { "password", "MyPassword" }, { "destination", "0012345,0023456,0034567,0045678,0056789,0067890,0078901,0089012,0090123,0099999" }, { "type", "text" }, { "charset", "UTF-8" }, { "text", "Hello, World!" } }); }
public Gsm0338TextSmsMessageTests() { _message = new TextSmsMessage(string.Empty, "00123") { EncodingType = TextEncodingType.Gsm0338 }; }
public async Task Text_with_Greek_unicode_chars() { // ARRANGE var message = new TextSmsMessage("Ελλάδα", "0012345") { MaxMessageCount = 1, EncodingType = TextEncodingType.Unicode }; // ACT await _gateway.Send(null, message); // ASSERT AssertBody(new Dictionary <string, string> { { "username", "MyName" }, { "password", "MyPassword" }, { "destination", "0012345" }, { "type", "unicode" }, { "charset", "UTF-8" }, { "text", "Ελλάδα" } }); }
public async Task Text_with_encoding_GSM() { // ARRANGE var message = new TextSmsMessage("Hello, World!", "0012345") { MaxMessageCount = 1, EncodingType = TextEncodingType.Gsm0338 }; // ACT await _gateway.Send(null, message); // ASSERT AssertBody(new Dictionary <string, string> { { "username", "MyName" }, { "password", "MyPassword" }, { "destination", "0012345" }, { "type", "text" }, { "charset", "UTF-8" }, { "text", "Hello, World!" } }); }
public SmsMessageDestinationTests() { _message = new TextSmsMessage("A"); }