public void Configure_Configure_ReturnNext() { var validateOptionsWithFluentValidationStartupFilter = new ValidateOptionsWithFluentValidationStartupFilter(Array.Empty <IValidateOptionsWithFluentValidationOnStartup>()); Action <IApplicationBuilder> next = _ => { }; validateOptionsWithFluentValidationStartupFilter.Configure(next).Should().BeSameAs(next); }
public void Configure_Configure_ValidateAll() { var validateOptionsWithFluentValidationOnStartupMock1 = new ValidateOptionsWithFluentValidationOnStartup(); var validateOptionsWithFluentValidationOnStartupMock2 = new ValidateOptionsWithFluentValidationOnStartup(); var startupValidators = new[] { validateOptionsWithFluentValidationOnStartupMock1, validateOptionsWithFluentValidationOnStartupMock2, }; var validateOptionsWithFluentValidationStartupFilter = new ValidateOptionsWithFluentValidationStartupFilter(startupValidators); Action <IApplicationBuilder> next = _ => { }; validateOptionsWithFluentValidationStartupFilter.Configure(next); validateOptionsWithFluentValidationOnStartupMock1.Counter.Should().Be(1); validateOptionsWithFluentValidationOnStartupMock2.Counter.Should().Be(1); }