public void GetMostRecentQuoteTest(Country country, string stockId)
        {
            IConfiguration        config      = TestServiceProvider.GetTestConfiguration();
            IStockQuoteProvider   provider    = new StockQuoteSourceProvider(config, country);
            IStockQuoteDataSource yahooSource = provider.GetStockDataSources().FirstOrDefault(a => a.Source == Contracts.StockQuoteSource.Yahoo);

            Assert.NotNull(yahooSource);

            IStockQuoteFromDataSource result = yahooSource.GetMostRecentQuoteAsync(country, stockId, WriteToErrorLogAction).Result;

            Assert.NotNull(result);
            Assert.True(result.IsValid);
        }
        public void GetHistoricalQuotesTest(Country country, string stockId)
        {
            IConfiguration        config      = TestServiceProvider.GetTestConfiguration();
            IStockQuoteProvider   provider    = new StockQuoteSourceProvider(config, country);
            IStockQuoteDataSource yahooSource = provider.GetStockDataSources().FirstOrDefault(a => a.Source == Contracts.StockQuoteSource.Yahoo);

            Assert.NotNull(yahooSource);

            DateTime start = new DateTime(2018, 3, 12);
            DateTime end   = new DateTime(2018, 3, 16);

            IReadOnlyList <IStockQuoteFromDataSource> results = yahooSource.GetHistoricalQuotesAsync(country, stockId, start, end, WriteToErrorLogAction).Result;

            Assert.NotNull(results);
            Assert.Equal(5, results.Count);

            foreach (IStockQuoteFromDataSource data in results)
            {
                Assert.True(data.IsValid);
            }
        }