Example #1
0
        public async void ShoulbeNotDeleteRequestIsNull()
        {
            DeleteMovieHandle handler = new DeleteMovieHandle(_mediator.Object, _repositoryMovie, _repositorySession);
            var response = await handler.Handle(null, new System.Threading.CancellationToken());

            response.Notifications.Should().ContainSingle(e => e.Message == Resource.RequestNotbeNull);
        }
Example #2
0
        public async void ShoulbeDeleteRequestExistInstance()
        {
            var repositorySession     = SessionRepositoryBuilder.Instance().Exists().Build();
            DeleteMovieHandle handler = new DeleteMovieHandle(_mediator.Object, _repositoryMovie, repositorySession);
            var response = await handler.Handle(_command, new System.Threading.CancellationToken());

            response.Notifications.Should().ContainSingle(e => e.Message == Resource.MovieExistsInSession);
        }
Example #3
0
        public async void ShouldDeleteMovie()
        {
            var repositorySession     = SessionRepositoryBuilder.Instance().NotExists().Build();
            DeleteMovieHandle handler = new DeleteMovieHandle(_mediator.Object, _repositoryMovie, repositorySession);
            var response = await handler.Handle(_command, new System.Threading.CancellationToken());

            response.Success.Should().BeTrue();
        }