public void Repository_MovieTheater_deveria_deletar_uma_sala()
        {
            //Arrange
            MovieTheater newMovieTheater = _repository.Add(_movieTheater);

            //Action
            _repository.Delete(newMovieTheater.Id);

            //Assert
            MovieTheater result = _repository.GetById(newMovieTheater.Id);

            result.Should().BeNull();
        }
示例#2
0
        public void ApplService_MovieTheater_deveria_retornar_sala_de_cinema()
        {
            //Arrange
            MovieTheater movieTheater = ObjectMother.movieTheaterDefault;

            _repository.Setup(x => x.GetById(It.IsAny <long>())).Returns(movieTheater);

            //Action
            MovieTheater movieTheaterResult = _appService.GetById(movieTheater.Id);

            //Assert
            _repository.Verify(p => p.GetById(It.IsAny <long>()), Times.Once());
            movieTheaterResult.Should().NotBeNull();
            movieTheaterResult.Id.Should().Be(movieTheater.Id);
            _repository.VerifyNoOtherCalls();
        }