Пример #1
0
        public void IsAtServiceAtFreeTime_False()
        {
            var carFacade = new CarFacade("10");
            var date1     = new DateTimeOffset(new DateTime(2018, 10, 06));
            var date2     = new DateTimeOffset(new DateTime(2018, 11, 06));
            var time      = new RentTime(date1, date2);

            var isAtService = carFacade.IsAtServiceAt(time);

            Assert.IsFalse(isAtService);
        }
Пример #2
0
        public void IsAtServiceAtBusyTime_True()
        {
            var carFacade = new CarFacade("10");
            var date1     = new DateTimeOffset(new DateTime(2018, 10, 06));
            var date2     = new DateTimeOffset(new DateTime(2018, 11, 06));
            var time      = new RentTime(date1, date2);

            carFacade.Car.Services.Add(time);
            var isAtService = carFacade.IsAtServiceAt(time);

            Assert.IsTrue(isAtService);
        }