public void SendSMS_InvalidAccountSIDAndAuthToken_Failure() { var twilioSMSManager = new TwilioSMSManager(new TwilioSMSServiceMock(), string.Empty, string.Empty); bool result = twilioSMSManager.SendSMS(ValidFromNumber, ValidToNumber, SMSMessage); Assert.AreNotEqual(string.Empty, twilioSMSManager.ErrorMessage); }
public async Task SendSMSAsync_InvalidAccountSIDAndAuthToken_Failure() { var twilioSMSManager = new TwilioSMSManager(new TwilioSMSServiceMock(), string.Empty, string.Empty); bool result = await Task.Run(() => { return(twilioSMSManager.SendSMSAsync(ValidFromNumber, ValidToNumber, SMSMessage)); }); Assert.AreNotEqual(string.Empty, twilioSMSManager.ErrorMessage); }
public void SendSMS_InvalidToAndFromNumber_Failure() { var twilioSMSManager = new TwilioSMSManager(new TwilioSMSServiceMock(), AccountSID, AuthToken); bool result = twilioSMSManager.SendSMS("", "", SMSMessage); Assert.IsFalse(result); Assert.AreNotEqual(0, twilioSMSManager.ErrorCode); Assert.AreNotEqual(string.Empty, twilioSMSManager.ErrorMessage); }
public void SendSMS_ValidToAndFromNumbers_Success() { var twilioSMSManager = new TwilioSMSManager(new TwilioSMSServiceMock(), AccountSID, AuthToken); bool result = twilioSMSManager.SendSMS(ValidToNumber, ValidToNumber, SMSMessage); Assert.IsTrue(result); Assert.AreEqual(0, twilioSMSManager.ErrorCode); Assert.AreEqual(string.Empty, twilioSMSManager.ErrorMessage); }
public async Task SendSMSAsync_InvalidToAndFromNumber_Failure() { var twilioSMSManager = new TwilioSMSManager(new TwilioSMSServiceMock(), AccountSID, AuthToken); bool result = await Task.Run(() => { return(twilioSMSManager.SendSMSAsync("", "", SMSMessage)); }); Assert.IsFalse(result); Assert.AreNotEqual(0, twilioSMSManager.ErrorCode); Assert.AreNotEqual(string.Empty, twilioSMSManager.ErrorMessage); }
public async Task SendSMSAsync_ValidToAndFromNumbers_Success() { var twilioSMSManager = new TwilioSMSManager(new TwilioSMSServiceMock(), AccountSID, AuthToken); bool result = await Task.Run(() => { return(twilioSMSManager.SendSMSAsync(ValidFromNumber, ValidToNumber, SMSMessage)); }); Assert.IsTrue(result); Assert.AreEqual(0, twilioSMSManager.ErrorCode); Assert.AreEqual(string.Empty, twilioSMSManager.ErrorMessage); }