Example #1
0
            public void PostCheckMobilePhoneIvalidTokenTest(string token)
            {
                var model = new PostClientPhoneModel()
                {
                    PhoneNumber = "+37529778899"
                };

                var response = walletApi.CheckMobilePhone.PostCheckMobilePhone(model, token);

                response.Validate.StatusCode(HttpStatusCode.Unauthorized);
            }
Example #2
0
            public void PostCheckMobilePhoneTest()
            {
                var model = new PostClientPhoneModel()
                {
                    PhoneNumber = "+37529778899"
                };

                AccountRegistrationModel newUser = new AccountRegistrationModel().GetTestModel();
                var registrationresponse         = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject();

                var response = walletApi.CheckMobilePhone.PostCheckMobilePhone(model, registrationresponse.Result.Token);

                response.Validate.StatusCode(HttpStatusCode.OK);
                Assert.That(response.GetResponseObject().Error, Is.Null);
            }
Example #3
0
            public void PostCheckMobilePhoneEmptyTest()
            {
                var model = new PostClientPhoneModel()
                {
                    PhoneNumber = ""
                };

                AccountRegistrationModel newUser = new AccountRegistrationModel().GetTestModel();
                var registrationresponse         = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject();

                var response = walletApi.CheckMobilePhone.PostCheckMobilePhone(model, registrationresponse.Result.Token);

                response.Validate.StatusCode(HttpStatusCode.OK);
                Assert.That(response.Content, Does.Contain("Field should not be empty"));
            }
Example #4
0
 public IResponse <ResponseModel> PostCheckMobilePhone(PostClientPhoneModel model, string token)
 {
     return(Request.Post(resource).AddJsonBody(model).WithBearerToken(token).Build().Execute <ResponseModel>());
 }