public void IncomingPhoneNumberSave(ref IncomingPhoneNumber incomingPhone)
 {
     StoredProcedure proc = new StoredProcedure(SQLResource.ProcessTwilioPhoneNumber, this.ConnectionString);
     proc.Parameters.AddWithValue("@PhoneNumberSID", incomingPhone.Sid);
     proc.Parameters.AddWithValue("@AccountSID", incomingPhone.AccountSid);
     proc.Parameters.AddWithValue("@FriendlyName", incomingPhone.FriendlyName);
     proc.Parameters.AddWithValue("@PhoneNumber", incomingPhone.PhoneNumber);
     proc.Parameters.AddWithValue("@DateCreated", incomingPhone.DateCreated);
     proc.Parameters.AddWithValue("@DateUpdated", incomingPhone.DateUpdated);
     proc.ExecuteNonQuery();
 }
        public void Setup()
        {
            _mockRestClient = new Mock<IRestClient>();
            var phoneNumber = new IncomingPhoneNumber
            {
                PhoneNumber = "+14159699064",
                FriendlyName = "(415) 969-9064"
            };
            _mockRestClient.Setup(x => x.PurchasePhoneNumber(It.IsAny<string>(), It.IsAny<string>()))
                .Returns(phoneNumber);

            _mockRepository = new Mock<IRepository<LeadSource>>();
            _mockRepository.Setup(x => x.Create(It.IsAny<LeadSource>()));
            _mockRepository.Setup(x => x.Update(It.IsAny<LeadSource>()));
        }
Ejemplo n.º 3
0
 public static void Save(IncomingPhoneNumber phoneNumber, IExternalDataProvider dataProvider)
 {
     dataProvider.IncomingPhoneNumberSave(ref phoneNumber);
 }