public void CheckSmsCodeAvailability_WhenProvidedCode_ReturnResponse(WireDataFormat format) { //arrange var client = TestContext.CreateClientValidCredentials(format); var smsResources = new SmsApi(client.HttpChannel); string validSmsCode = GenerateRandomSmsCode(); //act var result = smsResources.CheckSmsCodeAvailability(validSmsCode); //assert Assert.IsTrue(result.IsAvailable); }
public void RetrievePageSmsCode_WhenProvidedKnownFundraisingPage_ReturnSmsCode(WireDataFormat format) { //arrange var client = TestContext.CreateClientValidCredentials(format); var smsResources = new SmsApi(client.HttpChannel); var fundraisingResources = new PageApi(client.HttpChannel); var validRegisterRequest = ValidRegisterPageRequest(); fundraisingResources.Create(validRegisterRequest); //act var result = smsResources.RetrievePageSmsCode(validRegisterRequest.PageShortName); //assert Assert.IsNotNullOrEmpty(result.Urn); }
public void UpdatePageSmsCode_WhenProvidedValidRequestAndValidCredentials_ReturnTrue(WireDataFormat format) { //arrange var client = TestContext.CreateClientValidCredentials(format); var smsResources = new SmsApi(client.HttpChannel); var fundraisingResources = new PageApi(client.HttpChannel); var validRegisterRequest = ValidRegisterPageRequest(); fundraisingResources.Create(validRegisterRequest); var randomSmsCodeToUpdate = GenerateRandomSmsCode(); var validRequest = new SmsApi.SmsUpdate {Urn = randomSmsCodeToUpdate}; //act var result = smsResources.UpdatePageSmsCode(validRegisterRequest.PageShortName, validRequest); //assert Assert.IsTrue(result); }