public async void ShoulbeNotDeleteRequestIsNull() { DeleteSessionHandle handler = new DeleteSessionHandle(_mediator.Object, _repositorySession); var response = await handler.Handle(null, new System.Threading.CancellationToken()); response.Notifications.Should().ContainSingle(e => e.Message == Resource.RequestNotbeNull); }
public async void ShoulBeNotDeleteSessionUnder10Days() { var repositorySession = SessionRepositoryBuilder.Instance().Find(_id).Exists().Build(); DeleteSessionHandle handler = new DeleteSessionHandle(_mediator.Object, repositorySession); var response = await handler.Handle(_command, new System.Threading.CancellationToken()); response.Notifications.Should().ContainSingle(e => e.Message == Resource.SessionCanNotBeDeleteUnder10Days); }
public async void ShoulbeNotDeleteRequestNotFound() { var repositorySession = SessionRepositoryBuilder.Instance().NotFound().Build(); DeleteSessionHandle handler = new DeleteSessionHandle(_mediator.Object, repositorySession); var response = await handler.Handle(_command, new System.Threading.CancellationToken()); response.Notifications.Should().ContainSingle(e => e.Message == Resource.SessionNotFound); }
public async void ShouldDeleteMovie() { var repositorySession = SessionRepositoryBuilder.Instance().Find(_id).NotExists().Build(); DeleteSessionHandle handler = new DeleteSessionHandle(_mediator.Object, repositorySession); var response = await handler.Handle(_command, new System.Threading.CancellationToken()); response.Success.Should().BeTrue(); }