Exemplo n.º 1
0
 public void CreateMovie()
 {
     using (var mf = new MovieFactory())
     {
         var movie = mf.CreateMovie();
         Assert.IsNotNull(movie);
     };
 }
Exemplo n.º 2
0
 public void GetSetMovieProperties()
 {
     using (var mf = new MovieFactory())
     {
         var movie = mf.CreateMovie();
         movie.Title = "Test";
         Assert.AreEqual(movie.Title, "Test");
     }
 }
Exemplo n.º 3
0
 public void CountShowtimes()
 {
     using (var mf = new MovieFactory())
     {
         var movie        = mf.CreateMovie();
         int numShowtimes = movie.Showtimes.Count;
         Assert.AreEqual(numShowtimes, 0);
     }
 }
Exemplo n.º 4
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");
            }
        }