Exemplo n.º 1
0
        public void Test_CreateIndex_Simple()
        {
            // Dodaje se par indeksa i provjerava postoje li na burzi

            string firstIndexName = "DOW JONES";

            _stockExchange.CreateIndex(firstIndexName, IndexTypes.AVERAGE);
            string secondIndexName = "S&P";

            _stockExchange.CreateIndex(secondIndexName, IndexTypes.WEIGHTED);
            Assert.AreEqual(2, _stockExchange.NumberOfIndices());
            Assert.True(_stockExchange.IndexExists(firstIndexName));
            Assert.True(_stockExchange.IndexExists(secondIndexName));
            Assert.False(_stockExchange.IndexExists("AB"));
        }
Exemplo n.º 2
0
 public void Test_StockExchangeAtTheBeginig()
 {
     Assert.AreEqual(0, _stockExchange.NumberOfStocks());
     Assert.AreEqual(0, _stockExchange.NumberOfIndices());
     Assert.AreEqual(0, _stockExchange.NumberOfPortfolios());
 }