Exemple #1
0
        public async void ShoulbeNotUpdateRequestIsNull()
        {
            UpdateMovieHandle handler = new UpdateMovieHandle(_mediator.Object, _repositoryMovie);
            var response = await handler.Handle(null, new System.Threading.CancellationToken());

            response.Notifications.Should().ContainSingle(e => e.Message == Resource.RequestNotbeNull);
        }
Exemple #2
0
        public async void ShoulbeUpdate()
        {
            UpdateMovieHandle handler = new UpdateMovieHandle(_mediator.Object, _repositoryMovie);
            var response = await handler.Handle(_command, new System.Threading.CancellationToken());

            response.Success.Should().BeTrue();
        }
Exemple #3
0
        public async void ShoulBeNotFound()
        {
            var repositoryMovie       = MovieRepositoryBuilder.Instance().NotFound().Build();
            UpdateMovieHandle handler = new UpdateMovieHandle(_mediator.Object, repositoryMovie);
            var response = await handler.Handle(_command, new System.Threading.CancellationToken());

            response.Notifications.Should().ContainSingle(e => e.Message == Resource.MovieNotFound);
        }