public MockCinemaManager() { movieIDs = 0; movieeventIDs = 0; movies = new List <DTO.Movie>(); roommanager = new RoomManager(); movieevents = new List <DTO.MovieEvent>(); movieeventheaders = new List <DTO.MovieEventHeader>(); DTO.Movie m1 = new DTO.Movie() { Title = "Venom", Director = "Ruben Fleischer" }; DTO.Movie m2 = new DTO.Movie() { Title = "Az első ember", Director = "Damien Chazelle" }; DTO.Movie m3 = new DTO.Movie() { Title = "Egy kis szívesség", Director = "Paul Feig" }; AddMovie(m1); AddMovie(m2); AddMovie(m3); DTO.Room r = new DTO.Room() { RoomNumber = 5, Capacity = 20 }; DTO.Room r2 = new DTO.Room() { RoomNumber = 4, Capacity = 30 }; roommanager.CreateRoom(r); roommanager.CreateRoom(r2); DTO.MovieEvent me1 = new DTO.MovieEvent(); me1.Movie = m1; me1.Room = roommanager.SelectRoom(r.RoomId); me1.Time = new DateTime(2018, 10, 16, 14, 00, 00); DTO.MovieEvent me2 = new DTO.MovieEvent(); me2.Movie = m2; me2.Room = roommanager.SelectRoom(r.RoomId); me2.Time = new DateTime(2018, 10, 16, 18, 00, 00); DTO.MovieEvent me3 = new DTO.MovieEvent(); me3.Movie = m3; me3.Room = roommanager.SelectRoom(r2.RoomId); me3.Time = new DateTime(2018, 10, 17, 18, 00, 00); AddMovieEvent(me1); AddMovieEvent(me2); AddMovieEvent(me3); AddMovieEventHeader(movieevents.ElementAt(0)); AddMovieEventHeader(movieevents.ElementAt(1)); AddMovieEventHeader(movieevents.ElementAt(2)); }
public void AddRoom(DTO.Room r) { roommanager.CreateRoom(r); }