public void AuditoriumService_GetByCinemaid_RepositoryReturnsNull_ReturnsNull()
        {
            //Arrange
            IEnumerable <Auditorium>         auditoriums  = null;
            Task <IEnumerable <Auditorium> > responseTask = Task.FromResult(auditoriums);

            AuditoriumService auditoriumService = new AuditoriumService(_mockAuditoriumsRepository.Object, _mockProjectionService.Object, _mockSeatService.Object);

            _mockAuditoriumsRepository.Setup(x => x.GetByCinemaId(It.IsAny <int>())).Returns(responseTask);

            //Act
            var result = auditoriumService.GetByCinemaId(_auditorium.CinemaId).ConfigureAwait(false).GetAwaiter().GetResult();

            //Assert
            Assert.IsNull(result);
        }
        public void AuditoriumService_GetByCinemaId_ReturnsListOfAuditoriums()
        {
            //Arrange
            List <Auditorium> auditoriumsModelsList = new List <Auditorium>();

            auditoriumsModelsList.Add(_auditorium);
            IEnumerable <Auditorium>         auditoriums  = auditoriumsModelsList;
            Task <IEnumerable <Auditorium> > responseTask = Task.FromResult(auditoriums);
            int expectedCount = 1;

            AuditoriumService auditoriumService = new AuditoriumService(_mockAuditoriumsRepository.Object, _mockProjectionService.Object, _mockSeatService.Object);

            _mockAuditoriumsRepository.Setup(x => x.GetByCinemaId(It.IsAny <int>())).Returns(responseTask);

            //Act
            var result = auditoriumService.GetByCinemaId(_auditorium.CinemaId).ConfigureAwait(false).GetAwaiter().GetResult().ToList();

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(expectedCount, result.Count);
            Assert.IsInstanceOfType(result[0], typeof(AuditoriumDomainModel));
            Assert.AreEqual(result[0].Id, _auditorium.Id);
            Assert.AreEqual(result[0].CinemaId, _auditorium.CinemaId);
        }