public void PostClientKeysInvalidTokenTest(string token) { var encodedKey = TestData.GenerateString(16); var privateKey = TestData.GenerateString(16); var pubKey = TestData.GenerateString(16); var tempKey = TestData.GenerateString(16); var keys = new ClientKeysModel() { EncodedPrivateKey = encodedKey, PrivateKey = privateKey, PubKey = pubKey, TempKey = tempKey }; var response = walletApi.ClientKeys.PostClientKeys(keys, token); response.Validate.StatusCode(HttpStatusCode.Unauthorized); }
public void PostClientKeysTest() { var encodedKey = TestData.GenerateString(16); var privateKey = TestData.GenerateString(16); var pubKey = TestData.GenerateString(16); var tempKey = TestData.GenerateString(16); var keys = new ClientKeysModel() { EncodedPrivateKey = encodedKey, PrivateKey = privateKey, PubKey = pubKey, TempKey = tempKey }; AccountRegistrationModel newUser = new AccountRegistrationModel().GetTestModel(); var registrationresponse = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject(); var response = walletApi.ClientKeys.PostClientKeys(keys, registrationresponse.Result.Token); response.Validate.StatusCode(HttpStatusCode.OK); Assert.That(response.GetResponseObject().Error, Is.Null); }
public IResponse <ResponseModel> PostClientKeys(ClientKeysModel model, string token) { return(Request.Post(resource).AddJsonBody(model).WithBearerToken(token).Build().Execute <ResponseModel>()); }