Beispiel #1
0
        public void ParseSingleQuoteTest()
        {
            Country country = Country.USA;
            string  stockId = "HDV";

            AlphaVantageParser parser = new AlphaVantageParser();

            string jsonContent = TestUtilities.ReadTestFile(Av5MinsJsonFile);
            IStockQuoteFromDataSource quote = parser.ParseSingleQuote(country, stockId, jsonContent, WriteToErrorLogAction);

            Assert.NotNull(quote);
            Assert.True(quote.IsValid);
        }
Beispiel #2
0
        public void ParseSingleQuoteEmptyInputTest()
        {
            Country country = Country.USA;
            string  stockId = "HDV";

            AlphaVantageParser parser = new AlphaVantageParser();

            _isWriteToErrorLogActionRan = false;

            IStockQuoteFromDataSource quote = parser.ParseSingleQuote(country, stockId, null, WriteToErrorLogAction);

            Assert.Null(quote);
            Assert.True(_isWriteToErrorLogActionRan);
        }