Beispiel #1
0
        public void LoadDataTest()
        {
            StockData.Init();
            var marketDay    = StockData.GetCurrentDay();
            var numDays      = StockData.GetSize();
            var numCompanies = marketDay.TradedCompanies.Count;

            for (int i = 0; i < numDays; i++)
            {
                Assert.AreEqual("Apple Inc.", marketDay.TradedCompanies[1].Name);
                Assert.AreEqual("AAPL", marketDay.TradedCompanies[1].Symbol);
                Assert.AreEqual("Amazon.com Inc", marketDay.TradedCompanies[2].Name);
                Assert.AreEqual("AMZN", marketDay.TradedCompanies[2].Symbol);
                Assert.AreEqual(numCompanies, marketDay.TradedCompanies.Count);
                marketDay = StockData.AdvanceDay();
            }
        }