示例#1
0
        public void subSeriesCreation()
        {
            ITimeSeries subSeries = defaultSeries.GetSubSeries(2, 5);

            Assert.AreEqual(defaultSeries.Name, subSeries.Name);
            Assert.AreEqual(0, subSeries.GetBeginIndex());
            Assert.AreEqual(defaultSeries.GetBeginIndex(), subSeries.GetBeginIndex());
            Assert.AreEqual(2, subSeries.GetEndIndex());
            Assert.AreNotEqual(defaultSeries.GetEndIndex(), subSeries.GetEndIndex());
            Assert.AreEqual(3, subSeries.GetBarCount());

            subSeries = defaultSeries.GetSubSeries(-1000, 1000);
            Assert.AreEqual(0, subSeries.GetBeginIndex());
            Assert.AreEqual(defaultSeries.GetEndIndex(), subSeries.GetEndIndex());
        }