Exemplo n.º 1
0
        public void BookingTest_DateStartingAfter_ReturnsEmptyString()
        {
            var newbooking = new Booking
            {
                Id            = 2,
                ArrivalDate   = new DateTime(2017, 1, 21),
                DepartureDate = new DateTime(2017, 1, 25),
                Reference     = "a"
            };
            var result = BookingsHelper.OverlappingBookingsExist(newbooking, _repository.Object);

            Assert.AreEqual(string.Empty, result);
        }
Exemplo n.º 2
0
        public void BookingTest_DateStartingDuringAndEndingAfter_ReturnsA()
        {
            var newbooking = new Booking
            {
                Id            = 2,
                ArrivalDate   = new DateTime(2017, 1, 19),
                DepartureDate = new DateTime(2017, 1, 16),
                Reference     = "a"
            };
            var result = BookingsHelper.OverlappingBookingsExist(newbooking, _repository.Object);

            Assert.AreEqual("a", result);
        }