Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }