Пример #1
0
        public void CopyToTest()
        {
            DateTime             now         = ClockProxy.Clock.Now;
            SchoolDay            schoolDay   = new SchoolDay(now);
            TimePeriodCollection timePeriods = new TimePeriodCollection(schoolDay);

            ITimePeriod[] array = new ITimePeriod[schoolDay.Count];
            timePeriods.CopyTo(array, 0);
            Assert.Equal(array[0], schoolDay.Lesson1);
            Assert.Equal(array[1], schoolDay.Break1);
            Assert.Equal(array[2], schoolDay.Lesson2);
            Assert.Equal(array[3], schoolDay.Break2);
            Assert.Equal(array[4], schoolDay.Lesson3);
            Assert.Equal(array[5], schoolDay.Break3);
            Assert.Equal(array[6], schoolDay.Lesson4);
        }         // CopyToTest
Пример #2
0
        public void CopyToTest()
        {
            var now         = ClockProxy.Clock.Now;
            var schoolDay   = new SchoolDay(now);
            var timePeriods = new TimePeriodCollection(schoolDay);

            var array = new ITimePeriod[schoolDay.Count];

            timePeriods.CopyTo(array, 0);

            array[0].Should().Be(schoolDay.Lesson1);
            array[1].Should().Be(schoolDay.Break1);
            array[2].Should().Be(schoolDay.Lesson2);
            array[3].Should().Be(schoolDay.Break2);
            array[4].Should().Be(schoolDay.Lesson3);
            array[5].Should().Be(schoolDay.Break3);
            array[6].Should().Be(schoolDay.Lesson4);
        }
        public void CopyToTest() {
            var now = ClockProxy.Clock.Now;
            var schoolDay = new SchoolDay(now);
            var timePeriods = new TimePeriodCollection(schoolDay);

            var array = new ITimePeriod[schoolDay.Count];
            timePeriods.CopyTo(array, 0);

            array[0].Should().Be(schoolDay.Lesson1);
            array[1].Should().Be(schoolDay.Break1);
            array[2].Should().Be(schoolDay.Lesson2);
            array[3].Should().Be(schoolDay.Break2);
            array[4].Should().Be(schoolDay.Lesson3);
            array[5].Should().Be(schoolDay.Break3);
            array[6].Should().Be(schoolDay.Lesson4);
        }