public AnimalCentre() { hotel = new Hotel(); services = new Dictionary <string, IProcedure>(); this.adoptedAnimals = new Dictionary <string, List <string> >(); InitializeServices(); }
public RoomReservation( IHotel hotel, IFindRoom findFreeRoom) { _hotel = hotel; _findFreeRoom = findFreeRoom; }
public AnimalCentre() { this.hotel = new Hotel(); this.procedures = new Dictionary <string, IProcedure>(); this.adoptedAnimals = new Dictionary <string, List <string> >(); InitializateProcedurs(); }
public Reservation(IHotel hotel, IAccomodationProperty room, IClient client, DateTime date) { this.Hotel = hotel; this.Room = room; this.Client = client; this.Date = date.Date; }
public AnimalCentre() { this.animalFactory = new AnimalFactory(); this.hotel = new Hotel(); this.procedures = new List <IProcedure>(); this.adoptedAnimals = new Dictionary <string, List <string> >(); }
/// <summary> /// Instantiates a new HotelsController object. /// </summary> /// <param name="hotel"> /// IHotel: a repository object that implements the IHotel interface /// </param> public HotelsController(IHotel hotel, IHotelRoom hotelRoom, IRoom room, IAmenity amenity) { _hotel = hotel; _hotelRoom = hotelRoom; _room = room; _amenity = amenity; }
public RoomReservavtionTests() { _hotel = Substitute.For <IHotel>(); _hotel.Rooms = HotelRooms(); _findFreeRoom = Substitute.For <IFindRoom>(); _roomReservation = new RoomReservation(_hotel, _findFreeRoom); }
public AnimalCentre() { this.hotel = new Hotel(); this.history = new Dictionary <string, IProcedure>(); this.ownersAnimals = new Dictionary <string, List <string> >(); this.animalFactory = new AnimalFactory(); this.InitializeServices(); }
public AnimalCentre() { this.hotel = new Hotel(); this.animalFactory = new AnimalFactory(); this.procedures = new Dictionary <string, IProcedure>(); CreateProcedures(); this.ownerAnimals = new Dictionary <string, List <string> >(); }
public void ReserveRoom(IHotel hotel, int numberOfPeople, string extras, DateTime date) { IAccomodationProperty roomFound = hotel.checkAvailability(numberOfPeople, extras, date); Validation.CheckIfObjectIsNull(roomFound); this.reservations.Add(new Reservation(hotel, roomFound, this, date)); }
public QueueEntry(QueueEntryType type, IHotel hotel = null, IRoom room = null, IUser user = null, IReservation reservation = null) { Type = type; Hotel = new Hotel(hotel); Room = new Room(room); User = new User(user); Reservation = new Reservation(reservation); }
public Booking(IHotel hotel, RoomType roomType, IEnumerable <IPerson> persons, DateTime startDate, DateTime endDate) { id = Guid.NewGuid().ToString(); this.persons = persons; this.hotel = hotel; this.roomType = roomType; this.startDate = startDate; this.endDate = endDate; }
public AnimalCentre(Hotel hotel, Dictionary <string, List <IAnimal> > owners) { this.owners = owners; this.hotel = hotel; this.chip = new Chip(); this.vaccinate = new Vaccinate(); this.play = new Play(); this.nailTrim = new NailTrim(); this.dentalCare = new DentalCare(); this.fitness = new Fitness(); }
public AnimalCentre() { this.hotel = new Hotel(); this.animalFactory = new AnimalFactory(); this.chip = new Chip(); this.vaccinate = new Vaccinate(); this.fitness = new Fitness(); this.nailTrim = new NailTrim(); this.play = new Play(); this.dentailCare = new DentalCare(); this.owners = new Dictionary <string, List <string> >(); }
static void Main(string[] args) { HotelCreator hotelFactory = new HotelIntercontinentalCreator(); IHotel hotel = hotelFactory.FactoryMethod(); hotel.BuildHotel(); HotelCreator hotelcreator2 = new HotelBahiaDelSolCreator(); IHotel hotel2 = hotelcreator2.FactoryMethod(); hotel2.BuildHotel(); }
public AnimalCentre( IHotel hotel, IAnimalFactory animalFactory, IProcedureFactory procedureFactory) { this.hotel = hotel; this.animalFactory = animalFactory; this.procedureFactory = procedureFactory; this.animals = new List <IAnimal>(); this.procedures = new List <IProcedure>(); this.adoptedAnimals = new Dictionary <string, List <string> >(); }
public IBooking CreateReservation(IHotel hotel, RoomType roomType, IEnumerable <IPerson> persons, DateTime startDate, DateTime endDate) { if (bookingHelper.IsRoomAvailable(hotel, roomType, startDate, endDate)) { var booking = new Booking(hotel, roomType, persons, startDate, endDate); paymentService.RecievePayment(booking); bookingHelper.UpdateInventory(booking); return(booking); } else { return(null); } }
public Hotel(IHotel hotel) { Id = ObjectId.GenerateNewId().ToString(); if (hotel == null) { return; } Name = hotel.Name ?? ""; BuiltDateTime = hotel.BuiltDateTime != null ? hotel.BuiltDateTime : new DateTime(); Room = new Room(hotel.Room); Rooms = new List <IRoom> { Room }; }
public AnimalCentre() { this.hotel = new Hotel(); this.animalFactory = new AnimalFactory(); this.adoptedAnimals = new Dictionary <string, List <string> >(); this.chip = new Chip(); this.dentalCare = new DentalCare(); this.fitness = new Fitness(); this.nailTrim = new NailTrim(); this.play = new Play(); this.vaccinate = new Vaccinate(); this.procedures = new List <IProcedure>(); this.AddAllProcedures(); }
public AnimalCentre() { this.animalFactory = new AnimalFactory.AnimalFactory(); // zaradi namespace this.hotel = new Hotel(); this.adoptedAnimals = new Dictionary <string, List <string> >(); this.procedureAnimals = new Dictionary <string, IProcedure> { { "Chip", new Chip() }, { "DentalCare", new DentalCare() }, { "Fitness", new Fitness() }, { "NailTrim", new NailTrim() }, { "Play", new Play() }, { "Vaccinate", new Vaccinate() } }; }
public AnimalCentre() { this.adoptedAnimals = new Dictionary <string, List <string> >(); this.factoryAnimal = new FactoryAnimal(); this.hotel = new Hotel(); this.procedureAnimals = new Dictionary <string, IProcedure>() { { "Chip", new Chip() }, { "DentalCare", new DentalCare() }, { "Fitness", new Fitness() }, { "NailTrim", new NailTrim() }, { "Play", new Play() }, { "Vaccinate", new Vaccinate() }, }; }
private void Initialize(int size) { if (size > 1000) { throw new ArgumentException("Hotel size can't be over 1000 rooms"); } Hotel = new Hotel(); Hotel.Size = size; // generate rooms for hotel for (var i = 1; i <= size; i++) { Hotel.Rooms.Add(new Room(i)); } }
public DBTestBase() { _connection = new SqliteConnection("Filename=:memory:"); _connection.Open(); _db = new AsyncInnDbContext( new DbContextOptionsBuilder <AsyncInnDbContext>() .UseSqlite(_connection) .Options); _db.Database.EnsureCreated(); _hotel = new HotelRepo(_db, _hotelRoom); _hotelRoom = new HotelRoomRepo(_db, _room); _room = new RoomRepo(_db, _amenities); _amenities = new AmenitiesRepo(_db); }
public AnimalCentre(IHotel hotel, IProcedure procedure, Chip chip, DentalCare dentalcare, Fitness fitness, NailTrim nailtrim, Play play, Vaccinate vaccinate) { this.hotel = hotel; this.procedure = procedure; chip = new Chip(); dentalcare = new DentalCare(); fitness = new Fitness(); nailtrim = new NailTrim(); play = new Play(); vaccinate = new Vaccinate(); }
//Hotel Rooms constructor-- brings in code into a class public HotelRoomsController(AsyncInnDbContext context, IHotel hotel, IRoom room) { _context = context; _hotel = hotel; _room = room; }
public AnimalCentre() { this.hotel = new Hotel(); }
public HotelsController(IHotel hotelRepo) { _hotelRepo = hotelRepo; }
public HotelsController(IHotel context) { _hotel = context; }
public HotelsController(IHotel hotel) { _hotel = hotel; }
public HotelsController(IHotel hotels) { _hotels = hotels; }