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); }
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); }
public void FindBedRoom_Return_Bedroom() { Bedroom foundRoom = _hotel.findBedRoom(1); Assert.That(foundRoom, Is.EqualTo(_singleroom)); }
public Booking(int numberOfNights, Bedroom bedroom) { _numberOfNights = numberOfNights; _bedroom = bedroom; }
public void addBedroom(Bedroom bedroom) { _bedrooms.Add(bedroom); }
public void Setup() { _bedroom = new Bedroom(32, 5, "Double", 25.00); _guest1 = new Guest("John"); }