コード例 #1
0
            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);
            }
コード例 #2
0
            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);
            }
コード例 #3
0
 public IResponse <ResponseModel> PostCashOut(CashOutPostModel model, string token)
 {
     return(Request.Post(resource).WithBearerToken(token).AddJsonBody(model).Build().Execute <ResponseModel>());
 }