Browse Source

Fix unit tests.

pull/4453/head
maliming 6 years ago
parent
commit
2d2a5cbebf
  1. 13
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ModelBinding/ModelBindingController_Tests.cs

13
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 DateTimeKind DateTimeKind { get; set; }
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
services.Configure<AbpClockOptions>(x => x.Kind = DateTimeKind);
}
[Fact] [Fact]
public async Task DateTimeKind_Test() public async Task DateTimeKind_Test()
{ {
@ -84,17 +79,19 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding
public class ModelBindingController_Utc_Tests : ModelBindingController_Tests public class ModelBindingController_Utc_Tests : ModelBindingController_Tests
{ {
public ModelBindingController_Utc_Tests() protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{ {
DateTimeKind = DateTimeKind.Utc; DateTimeKind = DateTimeKind.Utc;
services.Configure<AbpClockOptions>(x => x.Kind = DateTimeKind);
} }
} }
public class ModelBindingController_Local_Tests : ModelBindingController_Tests public class ModelBindingController_Local_Tests : ModelBindingController_Tests
{ {
public ModelBindingController_Local_Tests() protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{ {
DateTimeKind = DateTimeKind.Local; DateTimeKind = DateTimeKind.Local;
services.Configure<AbpClockOptions>(x => x.Kind = DateTimeKind);
} }
} }
} }

Loading…
Cancel
Save