diff --git a/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs b/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs index e657710ded..d1c3bfccaa 100644 --- a/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs +++ b/test/Microsoft.AspNet.Identity.Test/IdentityOptionsTest.cs @@ -107,23 +107,16 @@ namespace Microsoft.AspNet.Identity.Test Assert.Equal(1001, options.Lockout.MaxFailedAccessAttempts); } - public class PasswordsNegativeLengthSetup : ConfigureOptions - { - public PasswordsNegativeLengthSetup() - : base(options => options.Password.RequiredLength = -1) - { } - } - [Fact] public void CanCustomizeIdentityOptions() { var services = new ServiceCollection() - .ConfigureOptions(); + .Configure(options => options.Password.RequiredLength = -1); services.AddIdentity(); var serviceProvider = services.BuildServiceProvider(); var setup = serviceProvider.GetRequiredService>(); - Assert.IsType(typeof(PasswordsNegativeLengthSetup), setup); + Assert.NotNull(setup); var optionsGetter = serviceProvider.GetRequiredService>(); Assert.NotNull(optionsGetter); var myOptions = optionsGetter.Value;