Пример #1
0
        public void Indicators_Highest_HighCollection_For_Period_Five()
        {
            IEnumerable <double> highest = Highest.HighCollection(MakeBars(), 5);

            Assert.AreEqual(10, highest.Count());
            Assert.AreEqual(141150, highest.ElementAt(9));
            Assert.AreEqual(141150, highest.ElementAt(8));
            Assert.AreEqual(141150, highest.ElementAt(7));
            Assert.AreEqual(141150, highest.ElementAt(6));
            Assert.AreEqual(141150, highest.ElementAt(5));
            Assert.AreEqual(140330, highest.ElementAt(4));
            Assert.AreEqual(140330, highest.ElementAt(3));
            Assert.AreEqual(140330, highest.ElementAt(2));
            Assert.AreEqual(140330, highest.ElementAt(1));
            Assert.AreEqual(140330, highest.ElementAt(0));
        }