public SendSMSResponse sendSMS(OutgoingSMS message) { List <OutgoingSMS> messages = new List <OutgoingSMS>(); messages.Add(message); List <SendSMSResponse> response = new List <SendSMSResponse>(); response = this.sendSMS(messages); return(response[0]); }
public void testSendSmsWithDuplicateUidSingle() { string uid = Guid.NewGuid().ToString(); OutgoingSMS message = new OutgoingSMS(PANEL_LINE, DESTINATION, "V2::testSendSmsWithDuplicateUidSingle()", uid); SendSMSResponse result = this.client.sendSMS(message); Assert.IsInstanceOf <SMSId>(result); Assert.IsFalse(((SMSId)result).IsDuplicated); message = new OutgoingSMS(PANEL_LINE, DESTINATION, "V2::testSendSmsWithDuplicateUidSingle()", uid); result = this.client.sendSMS(message); Assert.IsInstanceOf <SMSId>(result); Assert.IsTrue(((SMSId)result).IsDuplicated); }
public void testSendSingleSMS() { int initCredit = this.client.getCredit().SmsPageCount; OutgoingSMS message = new OutgoingSMS(PANEL_LINE, DESTINATION, "V2::testSendSingleSMS()"); SendSMSResponse response = client.sendSMS(message); Assert.IsInstanceOf <SMSId>(response); Status status = this.client.checkStatus(int.Parse(((SMSId)response).Id)); Assert.IsInstanceOf <Status>(status); int finalCredit = this.client.getCredit().SmsPageCount; Assert.LessOrEqual(initCredit - finalCredit, 1); }