IncomingPhoneNumbers() публичный Метод

public IncomingPhoneNumbers ( String phoneNumber = "", String friendlyName = "" ) : IList
phoneNumber String
friendlyName String
Результат IList
Пример #1
0
 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"));
     }
 }
Пример #2
0
        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);
        }