public void Theater_Remove_1()
        {
            // Arrange
            var newTheater = new Theater {
                Name = "Remove"
            };

            _unitOfWork.Theaters.Add(newTheater);
            _unitOfWork.SaveChanges();

            // Act
            var beforeDelete = _theaterService.GetAll();

            _theaterService.Remove(newTheater.TheaterId);
            var afterDelete = _theaterService.GetAll();

            // Assert
            Assert.AreEqual(1, beforeDelete.Count());
            Assert.AreEqual(0, afterDelete.Count());
        }
        public void Theater_Get_All_4()
        {
            // Arrange
            _unitOfWork.Theaters.Add(new Theater {
                Name = "Arena Cineplex", Type = TheaterType.Cinema
            });
            _unitOfWork.Theaters.Add(new Theater {
                Name = "SNP", Type = TheaterType.Play
            });
            _unitOfWork.Theaters.Add(new Theater {
                Name = "Pozorište Mladih", Type = TheaterType.Play
            });
            _unitOfWork.Theaters.Add(new Theater {
                Name = "Sinestar", Type = TheaterType.Cinema
            });
            _unitOfWork.SaveChanges();

            // Act
            var theaters = _theaterService.GetAll();

            // Assert
            Assert.AreEqual(4, theaters.Count());
        }
Beispiel #3
0
 public void InitData()
 {
     Movie     = movieService.GetDetail(id);
     Theaters  = theaterService.GetAll();
     ShowTimes = showTimeService.GetShowTimesByFilters(id, theater, date);
 }
Beispiel #4
0
 public void InitData()
 {
     Theaters = service.GetAll();
 }