public CreateModel(IReservations reservations,
                    IWhiskeys whiskeys,
                    IHtmlHelper htmlHelper,
                    UserManager <ApplicationUser> userManager)
 {
     _userManager    = userManager;
     _reservationsDb = reservations;
     _whiskeys       = whiskeys;
 }
예제 #2
0
        internal int[] FindFreeRoomTest([PexAssumeUnderTest] IReservations target, DateTime startDate, DateTime endDate, int capacity)
        {
            Mock <IRooms> mock = new Mock <IRooms>();

            mock.Setup(m => m.AllRooms).Returns(new Room[] {
                new Room(0, 4, "2x2", RoomStatus.Empty),
                new Room(1, 2, "1x2", RoomStatus.Occupied),
                new Room(2, 3, "1x2+1x1", RoomStatus.Empty),
                new Room(3, 1, "1x1", RoomStatus.Occupied),
                new Room(4, 3, "3x1", RoomStatus.Empty),
                new Room(5, 2, "2x1", RoomStatus.Empty),
                new Room(6, 2, "1x2", RoomStatus.Empty)
            });
            return(target.FindFreeRoom(startDate, endDate, capacity, mock.Object));
            // TODO: dodaj asercje do metoda ReservationsTest.CheckInClientTest(Reservations, String)
        }
예제 #3
0
        internal RoomStatus CheckInClientTest([PexAssumeUnderTest] IReservations target, string reservationID)
        {
            Mock <IRooms> mock = new Mock <IRooms>();

            mock.Setup(m => m.AllRooms).Returns(new Room[] {
                new Room(0, 4, "2x2", RoomStatus.Empty),
                new Room(1, 2, "1x2", RoomStatus.Occupied),
                new Room(2, 3, "1x2+1x1", RoomStatus.Empty),
                new Room(3, 1, "1x1", RoomStatus.Occupied),
                new Room(4, 3, "3x1", RoomStatus.Empty),
                new Room(5, 2, "2x1", RoomStatus.Empty),
                new Room(6, 2, "1x2", RoomStatus.Empty)
            });
            RoomStatus result = target.CheckInClient(reservationID, mock.Object);

            return(result);
            // TODO: dodaj asercje do metoda ReservationsTest.CheckInClientTest(Reservations, String)
        }
 public DetailsModel(IReservations reservations)
 {
     _reservationsDb = reservations;
 }
 public DeleteModel(IReservations reservations)
 {
     _reservationsDb = reservations;
 }
예제 #6
0
 public ReservationController(IReservations iReservation)
 {
     this.iReservation = iReservation;
 }
 public EditModel(IReservations reservations,
                  IWhiskeys whiskeysDb)
 {
     _reservationsDb = reservations;
     _whiskeys       = whiskeysDb;
 }
 public ListModel(IReservations reservations)
 {
     _reservationsDb = reservations;
 }