Пример #1
0
        public async void ShoulbeNotCreateRequestIsNull()
        {
            GetMovieHandle handler  = new GetMovieHandle(_mediator.Object, _repositoryMovie);
            var            response = await handler.Handle(null, new System.Threading.CancellationToken());

            response.Notifications.Should().ContainSingle(e => e.Message == Resource.RequestNotbeNull);
        }
Пример #2
0
        public async void ShoulBeFind()
        {
            GetMovieHandle handler  = new GetMovieHandle(_mediator.Object, _repositoryMovie);
            var            response = await handler.Handle(_command, new System.Threading.CancellationToken());

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

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