public void GetBaseAssetAfterPostWalletApiTest() { var newUser = new AccountRegistrationModel().GetTestModel(); var registeredClient = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject(); var model = new PostClientBaseCurrencyModel() { Id = "BTC" }; var response = walletApi.BaseAsset.PostBaseAsset(model, registeredClient.Result.Token); response.Validate.StatusCode(HttpStatusCode.OK); Assert.That(response.GetResponseObject().Error, Is.Null.Or.Empty); var getResponse = walletApi.BaseAsset.GetBaseAsset(registeredClient.Result.Token); getResponse.Validate.StatusCode(HttpStatusCode.OK); Assert.That(getResponse.GetResponseObject().Error, Is.Null.Or.Empty); }
public void BaseAssetsNotEmptyAfterAddedAssetTest() { var newUser = new AccountRegistrationModel().GetTestModel(); var registeredClient = walletApi.Registration.PostRegistrationResponse(newUser).GetResponseObject(); var model = new PostClientBaseCurrencyModel() { Id = "BTC" }; var response = walletApi.BaseAsset.PostBaseAsset(model, registeredClient.Result.Token); response.Validate.StatusCode(HttpStatusCode.OK); var getResponse = walletApi.BaseAsset.GetBaseAsset(registeredClient.Result.Token); getResponse.Validate.StatusCode(HttpStatusCode.OK); var responseBaseAssets = walletApi.BaseAssets.GetBaseAssets(registeredClient.Result.Token); responseBaseAssets.Validate.StatusCode(HttpStatusCode.OK); Assert.That(responseBaseAssets.GetResponseObject().Error, Is.Null); Assert.That(responseBaseAssets.GetResponseObject().Result.Assets.Count, Is.EqualTo(1)); }
public IResponse <ResponseModelGetClientBaseAssetRespModel> PostBaseAsset(PostClientBaseCurrencyModel model, string token) { return(Request.Post(resource).WithBearerToken(token).AddJsonBody(model).Build().Execute <ResponseModelGetClientBaseAssetRespModel>()); }