diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs index 632a02194f..f2ab8fd3d0 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs @@ -13,11 +13,6 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding { protected DateTimeKind DateTimeKind { get; set; } - protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services) - { - services.Configure(x => x.Kind = DateTimeKind); - } - [Fact] public async Task DateTimeKind_Test() { @@ -84,17 +79,19 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding public class ModelBindingController_Utc_Tests : ModelBindingController_Tests { - public ModelBindingController_Utc_Tests() + protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services) { DateTimeKind = DateTimeKind.Utc; + services.Configure(x => x.Kind = DateTimeKind); } } public class ModelBindingController_Local_Tests : ModelBindingController_Tests { - public ModelBindingController_Local_Tests() + protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services) { DateTimeKind = DateTimeKind.Local; + services.Configure(x => x.Kind = DateTimeKind); } } -} \ No newline at end of file +}