public void SetAlert_Should_RespondWithAlert() { // arrange var expected = new BitfinexAlert() { AlertKey = "key", AlertType = "type", Price = 0.1m, Symbol = "symbol", T = 0.2m }; var client = TestHelpers.CreateAuthenticatedResponseClient(expected); // act var result = client.SetAlert("symbol", 0.1m); // assert Assert.AreEqual(true, result.Success); Assert.IsTrue(TestHelpers.AreEqual(expected, result.Data)); }
public void SetAlert_Should_RespondWithAlert() { // arrange var expected = new BitfinexAlert() { AlertKey = "key", AlertType = "type", Price = 0.1m, Symbol = "symbol", T = 0.2m }; var client = PrepareClient(JsonConvert.SerializeObject(new object[] { "key", "type", "symbol", 0.1m, 0.2m })); // act var result = client.SetAlert("symbol", 0.1m); // assert Assert.AreEqual(true, result.Success); Assert.IsTrue(ObjectComparer.PublicInstancePropertiesEqual(expected, result.Data)); }
public void SetAlert_Should_RespondWithAlert() { // arrange var expected = new BitfinexAlert() { AlertKey = "key", AlertType = "type", Price = 0.1m, Symbol = "symbol", T = 0.2m }; var objects = TestHelpers.PrepareClient(() => Construct(new BitfinexClientOptions() { ApiCredentials = new ApiCredentials("Test", "Test") }), JsonConvert.SerializeObject(expected)); // act var result = objects.Client.SetAlert("symbol", 0.1m); // assert Assert.AreEqual(true, result.Success); Assert.IsTrue(TestHelpers.PublicInstancePropertiesEqual(expected, result.Data)); }