|
|
|
@ -6,8 +6,10 @@ using System.Text.Json;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
using Shouldly;
|
|
|
|
|
using Volo.Abp.Http;
|
|
|
|
|
using Volo.Abp.Json.SystemTextJson;
|
|
|
|
|
using Volo.Abp.Timing;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
@ -106,7 +108,7 @@ public abstract class ModelBindingController_Tests : AspNetCoreMvcTestBase
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ModelBindingController_Utc_Tests : ModelBindingController_Tests
|
|
|
|
|
public abstract class ModelBindingController_Utc_Tests : ModelBindingController_Tests
|
|
|
|
|
{
|
|
|
|
|
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
@ -117,7 +119,7 @@ public class ModelBindingController_Utc_Tests : ModelBindingController_Tests
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ModelBindingController_Local_Tests : ModelBindingController_Tests
|
|
|
|
|
public abstract class ModelBindingController_Local_Tests : ModelBindingController_Tests
|
|
|
|
|
{
|
|
|
|
|
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
@ -127,3 +129,46 @@ public class ModelBindingController_Local_Tests : ModelBindingController_Tests
|
|
|
|
|
base.ConfigureServices(context, services);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SystemTextJson_ModelBindingController_Utc_Tests : ModelBindingController_Utc_Tests
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class SystemTextJson_ModelBindingController_Local_Tests : ModelBindingController_Local_Tests
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Newtonsoft_ModelBindingController_Utc_Tests : ModelBindingController_Utc_Tests
|
|
|
|
|
{
|
|
|
|
|
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.Configure<AbpSystemTextJsonSerializerOptions>(options =>
|
|
|
|
|
{
|
|
|
|
|
options.UnsupportedTypes.Add<GetDateTimeKindModel>();
|
|
|
|
|
options.UnsupportedTypes.Add<GetDateTimeKindModel.GetDateTimeKindInnerModel>();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
services.Configure<IOptions<Newtonsoft_ModelBindingController_Utc_Tests>>(x =>
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
base.ConfigureServices(context, services);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Newtonsoft_ModelBindingController_Local_Tests : ModelBindingController_Local_Tests
|
|
|
|
|
{
|
|
|
|
|
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.Configure<AbpSystemTextJsonSerializerOptions>(options =>
|
|
|
|
|
{
|
|
|
|
|
options.UnsupportedTypes.Add<GetDateTimeKindModel>();
|
|
|
|
|
options.UnsupportedTypes.Add<GetDateTimeKindModel.GetDateTimeKindInnerModel>();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
base.ConfigureServices(context, services);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|