public HomeController(IRoomService roomService, IRoomTypeServices roomTypeServices, IRoomStatusService roomStatusServices) { _roomService = roomService; _roomTypeServices = roomTypeServices; _roomStatusServices = roomStatusServices; }
public void SetUp() { roomTypes = new List <RoomType> { new RoomType { Id = 0, Name = "0" }, new RoomType { Id = 1, Name = "1" }, new RoomType { Id = 2, Name = "2" }, new RoomType { Id = 3, Name = "3" } }; // Create a new mock of the repository _roomTypeRepository = new Mock <IRepository <RoomType> >(); _unitOfWork = new Mock <IUnitOfWork>(); // Set up the mock for the repository _unitOfWork.Setup(x => x.RoomTypes.GetAll()).Returns(roomTypes); _roomTypeRepository.Setup(x => x.GetAll()) .Returns(roomTypes); // Create the service and inject the repository into the service _roomTypeServices = new RoomTypeService(_unitOfWork.Object, new ModelStateDictionary()); }
public RequestController(IRoomTypeServices roomType, ICustomerRequestServices customerRequestServices, ICustomerRequestStatusService customerRequestStatusService) { _roomType = roomType; _customerRequestServices = customerRequestServices; _customerRequestStatusService = customerRequestStatusService; }
public AdminController(IRoomTypeServices roomType, IRoomStatusService roomStatusServices, IRoomService roomService) { _roomType = roomType; _roomStatusServices = roomStatusServices; _roomService = roomService; }
public ManageController(ICustomerRequestServices customerRequestServices, IRoomTypeServices roomTypeServices, ICustomerRequestStatusService customerRequestStatusService, IConfirmationService confirmationService, IRoomService roomService, IBookingService bookingService) { _customerRequestServices = customerRequestServices; _roomTypeServices = roomTypeServices; _customerRequestStatusService = customerRequestStatusService; _confirmationService = confirmationService; _roomService = roomService; _bookingService = bookingService; }