public void PostCashOutInvalidTokenTest(string token) { var cashOutModel = new CashOutPostModel() { Amount = 10, AssetId = "BTC", MultiSig = TestData.GenerateString(6) }; var response = walletApi.CashOut.PostCashOut(cashOutModel, token); response.Validate.StatusCode(HttpStatusCode.Unauthorized); }
public void PostCashOutTest() { Assert.Ignore("Get valid cashOutPostModel"); var newUser = new AccountRegistrationModel().GetTestModel(); var registeredClient = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject(); var cashOutModel = new CashOutPostModel() { Amount = 10, AssetId = "BTC", MultiSig = TestData.GenerateString(6) }; var response = walletApi.CashOut.PostCashOut(cashOutModel, registeredClient.Result.Token); response.Validate.StatusCode(HttpStatusCode.OK); Assert.That(response.GetResponseObject().Error, Is.Null); }
public IResponse <ResponseModel> PostCashOut(CashOutPostModel model, string token) { return(Request.Post(resource).WithBearerToken(token).AddJsonBody(model).Build().Execute <ResponseModel>()); }