public void GetDepositHistory_Should_RespondWithDepositHistory() { // arrange var history = new BinanceDepositList() { Success = true, List = new List <BinanceDeposit>() { new BinanceDeposit() { Amount = 1.1m, Asset = "BNB", InsertTime = new DateTime(2017, 1, 1), Status = DepositStatus.Pending }, new BinanceDeposit() { Amount = 2.2m, Asset = "BTC", InsertTime = new DateTime(2016, 1, 1), Status = DepositStatus.Success } } }; var client = TestHelpers.CreateResponseClient(history, new BinanceClientOptions() { ApiCredentials = new ApiCredentials("Test", "Test"), AutoTimestamp = false }); // act var result = client.GetDepositHistory(); // assert Assert.IsTrue(result.Success); Assert.IsTrue(result.Data.Success); Assert.AreEqual(result.Data.List.Count, history.List.Count); Assert.IsTrue(TestHelpers.AreEqual(history.List[0], result.Data.List[0])); Assert.IsTrue(TestHelpers.AreEqual(history.List[1], result.Data.List[1])); }
public void GetDepositHistory_Should_RespondWithDepositHistory() { // arrange var history = new BinanceDepositList() { Success = true, List = new List <BinanceDeposit>() { new BinanceDeposit() { Amount = 1.1m, Asset = "BNB", InsertTime = new DateTime(2017, 1, 1), Status = DepositStatus.Pending }, new BinanceDeposit() { Amount = 2.2m, Asset = "BTC", InsertTime = new DateTime(2016, 1, 1), Status = DepositStatus.Success } } }; var objects = TestHelpers.PrepareClient(() => Construct(new BinanceClientOptions() { ApiCredentials = new ApiCredentials("Test", "Test") }), JsonConvert.SerializeObject(history)); // act var result = objects.Client.GetDepositHistory(); // assert Assert.IsTrue(result.Success); Assert.IsTrue(result.Data.Success); Assert.AreEqual(result.Data.List.Count, history.List.Count); Assert.IsTrue(TestHelpers.PublicInstancePropertiesEqual(history.List[0], result.Data.List[0])); Assert.IsTrue(TestHelpers.PublicInstancePropertiesEqual(history.List[1], result.Data.List[1])); }
public void GetDepositHistory_Should_RespondWithDepositHistory() { // arrange var history = new BinanceDepositList() { Success = true, List = new List <BinanceDeposit>() { new BinanceDeposit() { Amount = 1.1, Asset = "BNB", InsertTime = new DateTime(2017, 1, 1), Status = DepositStatus.Pending }, new BinanceDeposit() { Amount = 2.2, Asset = "BTC", InsertTime = new DateTime(2016, 1, 1), Status = DepositStatus.Success } } }; var client = PrepareClient(JsonConvert.SerializeObject(history)); // act var result = client.GetDepositHistory(); // assert Assert.IsTrue(result.Success); Assert.IsTrue(result.Data.Success); Assert.AreEqual(result.Data.List.Count, history.List.Count); Assert.IsTrue(Compare.PublicInstancePropertiesEqual(history.List[0], result.Data.List[0])); Assert.IsTrue(Compare.PublicInstancePropertiesEqual(history.List[1], result.Data.List[1])); }