public void IsFreeAtFreeTime_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); var isFreeAt = carFacade.IsFreeAt(time); Assert.IsTrue(isFreeAt); }
public void IsFreeAtServiceTime_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); carFacade.Car.Services.Add(time); var isFreeAt = carFacade.IsFreeAt(time); Assert.IsFalse(isFreeAt); }