public void AddBookingDetailTest() { var bookingrepo = new BookingRepository(bookcontextmock.Object); var bookingobj = bookingrepo.Book(new BookingModel { Booking_Id = 3, vehicle_Id = 1, User_Id = 1, BookingDate = DateTime.Parse("2020-03-03"), No_ofMonth = 1, TotalCost = 6000.00 }); Assert.IsNotNull(bookingobj); }
public void ShouldBookOn1PmTest() { // Arrange DateTime bookDate = _dateToTest.AddHours(13); BookingRequest request = new BookingRequest { RoomName = "Room 1", BookedBy = "Vinod", BookFromUtc = GetTimeInUtc(bookDate), BookToUtc = GetTimeInUtc(bookDate.AddHours(1)) }; // Act Booking booking = _repository.Book(request); // Assert Assert.AreEqual(request.BookFromUtc, booking.BookedFromUtc); }