Esempio n. 1
0
        public void EnabledOnStopTime()
        {
            var sw = new ServiceWindow {
                StopTime = new Time(20, 0)
            };

            Assert.That(sw.Enabled, Is.True);
        }
Esempio n. 2
0
        public void DateOfCustomStartAndSopTimeIsEqualsToDateOfDefaultStartAndStopTime()
        {
            var sw = new ServiceWindow {
                StartTime = new Time(8, 0), StopTime = new Time(20, 0)
            };

            Assert.That(((DateTime)sw.StartTime).Date, Is.EqualTo(((DateTime)ServiceWindow.None.StartTime).Date));
            Assert.That(((DateTime)sw.StartTime).TimeOfDay, Is.Not.EqualTo(((DateTime)ServiceWindow.None.StartTime).TimeOfDay));
            Assert.That(((DateTime)sw.StopTime).Date, Is.EqualTo(((DateTime)ServiceWindow.None.StopTime).Date));
            Assert.That(((DateTime)sw.StopTime).TimeOfDay, Is.Not.EqualTo(((DateTime)ServiceWindow.None.StopTime).TimeOfDay));
        }
Esempio n. 3
0
 private Schedule(DateTime startDate, DateTime stopDate, ServiceWindow serviceWindow)
 {
     StartDate     = startDate;
     StopDate      = stopDate;
     ServiceWindow = serviceWindow;
 }
Esempio n. 4
0
        static ServiceWindow()
        {
            var ti = new TransportInfo();

            _none = new ServiceWindow(ti.FromTime, ti.ToTime);
        }