public void ParseMultiQuotesEmptyInputTest() { Country country = Country.USA; string stockId = "HDV"; _isWriteToErrorLogActionRan = false; AlphaVantageParser parser = new AlphaVantageParser(); IReadOnlyList <IStockQuoteFromDataSource> quotes = parser.ParseMultiQuotes(country, stockId, null, WriteToErrorLogAction); Assert.Null(quotes); Assert.True(_isWriteToErrorLogActionRan); }
public void ParseMultiQuotesTest(string jsonFile) { Country country = Country.USA; string stockId = "HDV"; IStockQuoteParser parser = new AlphaVantageParser(); string jsonContent = TestUtilities.ReadTestFile(jsonFile); IReadOnlyList <IStockQuoteFromDataSource> quotes = parser.ParseMultiQuotes(country, stockId, jsonContent, WriteToErrorLogAction); Assert.NotNull(quotes); foreach (IStockQuoteFromDataSource quote in quotes) { Assert.True(quote.IsValid); } }