public async Task ValidateTest() { var bus = A.Fake <IServiceBus>(); var user = A.Fake <ClaimsPrincipal>(); var service = new DefaultValidationService(); await service.Validate(bus, user, new ValidatableMessage { Name = "ValidatableMessage" }); }
public async Task ValidateFailedTest() { var bus = A.Fake <IServiceBus>(); var user = A.Fake <ClaimsPrincipal>(); var service = new DefaultValidationService(); await Assert.ThrowsAsync <ValidationException>(() => { return(service.Validate(bus, user, new ValidatableMessage())); }); }