Example #1
0
        public void ShouldDeleteIncomingPhoneNumber()
        {
            var client = new TwilioRestClient(Credentials.AccountSid, Credentials.AuthToken);
            var status = client.DeleteIncomingPhoneNumber("");

            Assert.AreEqual(DeleteStatus.Success, status);
            Assert.Fail();
        }
Example #2
0
        public void ShouldDeleteIncomingPhoneNumberAsynchronously()
        {
            manualResetEvent = new ManualResetEvent(false);

            var client = new TwilioRestClient(Credentials.AccountSid, Credentials.AuthToken);

            DeleteStatus status = DeleteStatus.Failed;

            client.DeleteIncomingPhoneNumber("", number => {
                status = number;
                manualResetEvent.Set();
            });

            manualResetEvent.WaitOne();

            Assert.AreEqual(DeleteStatus.Success, status);
            Assert.Fail();
        }
Example #3
0
 public VoipPhone DeleteNumber(VoipPhone phone)
 {
     client.DeleteIncomingPhoneNumber(phone.Id);
     return(phone);
 }
        public void ShouldDeleteIncomingPhoneNumberAsynchronously()
        {
            manualResetEvent = new ManualResetEvent(false);

            var client = new TwilioRestClient(Credentials.AccountSid, Credentials.AuthToken);
            
            DeleteStatus status = DeleteStatus.Failed;
            client.DeleteIncomingPhoneNumber("", number => {
                status = number;
                manualResetEvent.Set();
            });

            manualResetEvent.WaitOne();
            
            Assert.AreEqual(DeleteStatus.Success, status);
            Assert.Fail();
        }
 public void ShouldDeleteIncomingPhoneNumber()
 {
     var client = new TwilioRestClient(Credentials.AccountSid, Credentials.AuthToken);
     var status = client.DeleteIncomingPhoneNumber("");
     Assert.AreEqual(DeleteStatus.Success, status);
     Assert.Fail();
 }
Example #6
0
 /// <summary>
 /// Releases the number.
 /// </summary>
 /// <param name="incomingNumberSid">The incoming number sid.</param>
 public void ReleaseNumber(string incomingNumberSid)
 {
     _twilio.DeleteIncomingPhoneNumber(incomingNumberSid);
 }