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);
        }