public void BooksClientTest() { var client = new BitfinexRestClient(); var books = client.GetBooks("tBTCUSD", Precision.P0, 5); Assert.AreEqual(10, books.Count); }
public void BooksClientWrongSymbolTest() { try { var client = new BitfinexRestClient(); client.GetBooks("fUSD", Precision.P0, 5); } catch (Exception ex) { if (ex.InnerException != null) { Assert.AreEqual(ex.InnerException.Message, "(10020) symbol: invalid"); } } }
public void BooksClientIncorrectEndpointTest() { try { var client = new BitfinexRestClient { BaseUrl = "https://api.bitfinexf.com/v2" }; client.GetBooks("fUSD", Precision.P0, 5); } catch (Exception ex) { if (ex.InnerException != null) { Assert.AreEqual(ex.InnerException.Message, "The remote name could not be resolved: 'api.bitfinexf.com'"); } } }