Пример #1
0
            public void PostChangePinAndPasswordInvalidModelSOMTest()
            {
                var model = new PostChangePinAndPasswordModel()
                {
                    Email = TestData.GenerateEmail()
                };
                var response = walletApi.ChangePinAndPassword.PostChangePinAndPassword(model);

                response.Validate.StatusCode(HttpStatusCode.OK);
                Assert.That(response.Content, Does.Contain("SignedOwnershipMsg"));
                Assert.That(response.Content, Does.Contain("Field should not be empty"));
            }
Пример #2
0
            public void PostChangePinAndPasswordInvalidModelPinTest()
            {
                var model = new PostChangePinAndPasswordModel()
                {
                    Email = TestData.GenerateEmail(),
                    SignedOwnershipMsg = TestData.GenerateString(),
                    NewHint            = TestData.GenerateString(6),
                    NewPassword        = TestData.GenerateString(10),
                    NewPin             = TestData.GenerateNumbers(4)
                };
                var response = walletApi.ChangePinAndPassword.PostChangePinAndPassword(model);

                response.Validate.StatusCode(HttpStatusCode.OK);
                Assert.That(response.Content, Does.Contain("NewPin"));
                Assert.That(response.Content, Does.Contain("Field should not be empty"));
            }
Пример #3
0
            public void PostChangePinAndPasswordInvalidPinTest()
            {
                var model = new PostChangePinAndPasswordModel()
                {
                    Email              = TestData.GenerateEmail(),
                    EncodedPrivateKey  = TestData.GenerateString(),
                    NewHint            = TestData.GenerateString(),
                    NewPassword        = TestData.GenerateString(8),
                    NewPin             = "test pin",// only dig
                    PartnerId          = TestData.GenerateLetterString(6),
                    SignedOwnershipMsg = TestData.GenerateString(8),
                    SmsCode            = TestData.GenerateNumbers(8)
                };
                var response = walletApi.ChangePinAndPassword.PostChangePinAndPassword(model);

                response.Validate.StatusCode(HttpStatusCode.OK);
                Assert.That(response.Content, Does.Contain("Pin should contain digits only"));
            }
Пример #4
0
            public void PostChangePinAndPasswordTest()
            {
                Assert.Ignore("How get positive case?");
                AccountRegistrationModel newUser = new AccountRegistrationModel().GetTestModel();
                var registrationresponse         = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject();

                Assert.That(registrationresponse.Error, Is.Null, $"Error message not empty {registrationresponse.Error?.Message}");

                var model = new PostChangePinAndPasswordModel()
                {
                    Email              = newUser.Email,//invalid value
                    EncodedPrivateKey  = TestData.GenerateString(),
                    NewHint            = newUser.Hint,
                    NewPassword        = TestData.GenerateString(8),
                    NewPin             = TestData.GenerateNumbers(8),// only dig
                    PartnerId          = TestData.GenerateLetterString(6),
                    SignedOwnershipMsg = TestData.GenerateString(8),
                    SmsCode            = TestData.GenerateNumbers(8)
                };
                var response = walletApi.ChangePinAndPassword.PostChangePinAndPassword(model);

                response.Validate.StatusCode(HttpStatusCode.OK);
            }
 public IResponse <ResponseModel> PostChangePinAndPassword(PostChangePinAndPasswordModel model)
 {
     return(Request.Post(resource).AddJsonBody(model).Build().Execute <ResponseModel>());
 }