public void PostCheckMobilePhoneIvalidTokenTest(string token) { var model = new PostClientPhoneModel() { PhoneNumber = "+37529778899" }; var response = walletApi.CheckMobilePhone.PostCheckMobilePhone(model, token); response.Validate.StatusCode(HttpStatusCode.Unauthorized); }
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); }
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")); }
public IResponse <ResponseModel> PostCheckMobilePhone(PostClientPhoneModel model, string token) { return(Request.Post(resource).AddJsonBody(model).WithBearerToken(token).Build().Execute <ResponseModel>()); }