public FileQoSOptionsFluentValidatorTests() { _services = new ServiceCollection(); var provider = _services.BuildServiceProvider(); _validator = new FileQoSOptionsFluentValidator(provider); }
private ValidationResult ValidateModel(FileReRouteViewModel model) { var hostAndPortValidator = new HostAndPortValidator(); var fileQoSValidator = new FileQoSOptionsFluentValidator(_serviceProvider); var validator = new ReRouteFluentValidator(null, hostAndPortValidator, fileQoSValidator); return(validator.Validate(model.FileReRoute)); }
private void GivenAQosDelegate() { QosDelegatingHandlerDelegate fake = (a, b) => { return(null); }; _services.AddSingleton <QosDelegatingHandlerDelegate>(fake); var provider = _services.BuildServiceProvider(); _validator = new FileQoSOptionsFluentValidator(provider); }