Beispiel #1
0
 public void Setup()
 {
     _hotel          = new Hotel();
     _singleroom     = new Bedroom(1, 2, "single", 25.00);
     _doubleroom     = new Bedroom(2, 3, "double", 40.00);
     _diningRoom     = new DiningRoom("Heaven");
     _conferenceRoom = new ConferenceRoom(10, "BigMess");
     _guest1         = new Guest("John");
     _guest2         = new Guest("Paul");
     _guest3         = new Guest("Steve");
     _hotel.addBedroom(_singleroom);
     _hotel.addBedroom(_doubleroom);
     _hotel.addConferenceRoom(_conferenceRoom);
     _hotel.addDiningRoom(_diningRoom);
 }
Beispiel #2
0
        public Bedroom findBedRoom(int roomNumber)
        {
            Bedroom foundRoom = null;
            {
                foreach (Bedroom bedroom in _bedrooms)
                {
                    if (bedroom.RoomNumber == roomNumber)
                    {
                        foundRoom = bedroom;
                    }
                }

                return(foundRoom);
            }
        }
 public void SetUp()
 {
     _booking = new Booking(2, _bedroom);
     _bedroom = new Bedroom(2, 4, "Double", 25.00);
 }
Beispiel #4
0
        public void FindBedRoom_Return_Bedroom()
        {
            Bedroom foundRoom = _hotel.findBedRoom(1);

            Assert.That(foundRoom, Is.EqualTo(_singleroom));
        }
Beispiel #5
0
 public Booking(int numberOfNights, Bedroom bedroom)
 {
     _numberOfNights = numberOfNights;
     _bedroom        = bedroom;
 }
Beispiel #6
0
 public void addBedroom(Bedroom bedroom)
 {
     _bedrooms.Add(bedroom);
 }
 public void Setup()
 {
     _bedroom = new Bedroom(32, 5, "Double", 25.00);
     _guest1  = new Guest("John");
 }