public RoomAvailabilityServiceTests() { store = new TestRoomAvailabilityStore( new RoomAvailability(Ids.AvailableRoom, 10), new RoomAvailability(Ids.OptimisticLockRoom, 1)); service = new RoomAvailabilityService(store); }
public List <Room> GetAvailableRooms() { RoomAvailabilityService roomAvailabilityService = new RoomAvailabilityService(); List <Room> rooms = new List <Room>(); foreach (Room room in GetAllRooms()) { if (roomAvailabilityService.IsRoomAvailableForInpatientCare(room)) { rooms.Add(room); } } Console.WriteLine("GET AVAILABLE ROOMS"); foreach (Room r in rooms) { Console.WriteLine(r); } return(rooms); }
public List <Bed> GetAvailableBeds(Room room) { RoomAvailabilityService roomAvailabilityService = new RoomAvailabilityService(); return(roomAvailabilityService.GetAvailableBeds(room)); }