Esempio n. 1
0
        public void GetStartRangeTest3()
        {
            Range limiting = new Range(0, 100);

            int currentIndex = 0;

            IList <Range> dataPoint = new List <Range>();

            dataPoint.Add(new Range(0, 11));
            dataPoint.Add(new Range(1, 19));
            dataPoint.Add(new Range(1, 19));
            dataPoint.Add(new Range(1, 31));
            dataPoint.Add(new Range(1, 54));
            dataPoint.Add(new Range(1, 23));


            IList <Range> orderStartTime = (from x in dataPoint
                                            orderby x.Start ascending, x.End ascending
                                            select x).ToList();

            int lastIndex = 0;

            int startTime = Availability.GetStartRange(limiting.Start, ref currentIndex,
                                                       orderStartTime, out lastIndex);

            Assert.AreEqual(55, startTime);
        }