public IncomingPhoneNumbers ( String phoneNumber = "", String friendlyName = "" ) : IList |
||
phoneNumber | String | |
friendlyName | String | |
Результат | IList |
public void IncomingPhoneNumbersWithNowParametersShouldThrowNullReferenceError() { try { var account = new TwilioAccountMock(); var phoneAutomation = new PhoneAutomation(account); phoneAutomation.IncomingPhoneNumbers(); Assert.Fail("Cannot call this method without params"); } catch (System.Exception ex) { Assert.IsInstanceOfType(ex, typeof(System.ArgumentNullException)); Assert.IsTrue(ex.Message.Contains("missing phoneNumber")); } }
public void IncomingPhoneNumbersByFriendlyNameShouldReturnListOfPhoneNumbers() { var account = new TwilioAccountMock(); var phoneAutomation = new PhoneAutomation(account); var numbers = phoneAutomation.IncomingPhoneNumbers(phoneNumber: "555-555-5555", friendlyName: "test"); Assert.IsNotNull(numbers); }