Beispiel #1
0
 public void Test_CreateIndex_Simple()
 {
     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"));
 }
        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.IsTrue(_stockExchange.IndexExists(firstIndexName));
            Assert.IsTrue(_stockExchange.IndexExists(secondIndexName));
            Assert.IsFalse(_stockExchange.IndexExists("AB"));
        }