Exemple #1
0
 public RoomAvailabilityServiceTests()
 {
     store = new TestRoomAvailabilityStore(
         new RoomAvailability(Ids.AvailableRoom, 10),
         new RoomAvailability(Ids.OptimisticLockRoom, 1));
     service = new RoomAvailabilityService(store);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
        public List <Bed> GetAvailableBeds(Room room)
        {
            RoomAvailabilityService roomAvailabilityService = new RoomAvailabilityService();

            return(roomAvailabilityService.GetAvailableBeds(room));
        }