public async Task Given_An_Invalid_BanlistInformationTask_Should_Return_Errors() { // Arrange var task = new BanlistInformationTask(); // Act var result = await _sut.Handle(task, CancellationToken.None); // Assert result.Errors.Should().NotBeEmpty(); }
public async Task Given_A_BanlistInformationTask_If_Validation_Fails_Should_Return_Errors() { // Arrange _validator.Validate(Arg.Any <BanlistInformationTask>()).Returns(new ValidationResult(new List <ValidationFailure> { new ValidationFailure("propertyName", "failed") })); // Act var result = await _sut.Handle(new BanlistInformationTask(), CancellationToken.None); // Assert result.Errors.Should().NotBeNullOrEmpty(); }