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); }
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); }
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(); }