public void CreateMovie() { using (var mf = new MovieFactory()) { var movie = mf.CreateMovie(); Assert.IsNotNull(movie); }; }
public void GetSetMovieProperties() { using (var mf = new MovieFactory()) { var movie = mf.CreateMovie(); movie.Title = "Test"; Assert.AreEqual(movie.Title, "Test"); } }
public void CountShowtimes() { using (var mf = new MovieFactory()) { var movie = mf.CreateMovie(); int numShowtimes = movie.Showtimes.Count; Assert.AreEqual(numShowtimes, 0); } }
public void GetSetShowtimeProperties() { using (var mf = new MovieFactory()) { var movie = mf.CreateMovie(); var showtime = new Showtime { Id = 1, Time = DateTime.Now, Channel = "TestChannel" }; movie.Showtimes.Add(showtime); int numShowtimes = movie.Showtimes.Count; Assert.AreEqual(numShowtimes, 1); Assert.AreEqual(movie.Showtimes[0].Channel, "TestChannel"); } }