|
@@ -1,10 +1,13 @@
|
|
-using Hotline.Orders;
|
|
|
|
|
|
+using AngleSharp.Text;
|
|
|
|
+using Hotline.Orders;
|
|
using Hotline.Settings;
|
|
using Hotline.Settings;
|
|
using Hotline.Settings.TimeLimitDomain;
|
|
using Hotline.Settings.TimeLimitDomain;
|
|
using Hotline.Settings.TimeLimitDomain.Repository;
|
|
using Hotline.Settings.TimeLimitDomain.Repository;
|
|
using Hotline.Share.Dtos.Settings;
|
|
using Hotline.Share.Dtos.Settings;
|
|
using Hotline.Share.Enums.FlowEngine;
|
|
using Hotline.Share.Enums.FlowEngine;
|
|
|
|
+using Hotline.Share.Enums.Order;
|
|
using Hotline.Share.Enums.Settings;
|
|
using Hotline.Share.Enums.Settings;
|
|
|
|
+using Hotline.Share.Tools;
|
|
using Mapster;
|
|
using Mapster;
|
|
using Shouldly;
|
|
using Shouldly;
|
|
using XF.Domain.Repository;
|
|
using XF.Domain.Repository;
|
|
@@ -43,16 +46,16 @@ public class ZiGongExpireTimeTest
|
|
//}
|
|
//}
|
|
|
|
|
|
[Theory]
|
|
[Theory]
|
|
- [InlineData("企业咨询件单元测试", "2024-09-04 14:00:00", "CenterToOrg", "2024-09-05 14:00:00")]
|
|
|
|
- [InlineData("企业建议件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
- [InlineData("企业求助件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
- [InlineData("企业表扬件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
- [InlineData("企业举报件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
- [InlineData("企业投诉件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
- [InlineData("四川省12345咨询件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-06 14:00:00")]
|
|
|
|
- [InlineData("四川省12345建议件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-10 14:00:00")]
|
|
|
|
- [InlineData("中心到中心24小时", "2024-09-12 14:00:00", "CenterToCenter", "2024-09-13 14:00:00")]
|
|
|
|
- public async Task CalcExpiredTime_Test(string title, string beginTxt, string flowTxt, string expected)
|
|
|
|
|
|
+ [InlineData("Enterprise", "企业咨询件单元测试", "2024-09-04 14:00:00", "CenterToOrg", "2024-09-05 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "企业建议件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "企业求助件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "企业表扬件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "企业举报件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "企业投诉件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-09 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "四川省12345咨询件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-06 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "四川省12345建议件单元测试", "2024-09-05 14:00:00", "CenterToOrg", "2024-09-10 14:00:00")]
|
|
|
|
+ [InlineData("Enterprise", "中心到中心24小时", "2024-09-12 14:00:00", "CenterToCenter", "2024-09-13 14:00:00")]
|
|
|
|
+ public async Task CalcExpiredTime_Test(string identityType, string title, string beginTxt, string flowTxt, string expected)
|
|
{
|
|
{
|
|
var beginTime = DateTime.Parse(beginTxt);
|
|
var beginTime = DateTime.Parse(beginTxt);
|
|
var order = await _orderRepository.Queryable().Where(m => m.Title == title).FirstAsync();
|
|
var order = await _orderRepository.Queryable().Where(m => m.Title == title).FirstAsync();
|
|
@@ -60,7 +63,7 @@ public class ZiGongExpireTimeTest
|
|
Enum.TryParse(flowTxt, out EFlowDirection flow);
|
|
Enum.TryParse(flowTxt, out EFlowDirection flow);
|
|
var inDto = new OrderTimeClacInfo
|
|
var inDto = new OrderTimeClacInfo
|
|
{
|
|
{
|
|
- //IdentityType =
|
|
|
|
|
|
+ IdentityType = identityType.ToEnum<EIdentityType>()
|
|
};
|
|
};
|
|
var time = await _ziGongExpireTimeLimit.CalcExpiredTime(beginTime, flow, order.Adapt<OrderTimeClacInfo>());
|
|
var time = await _ziGongExpireTimeLimit.CalcExpiredTime(beginTime, flow, order.Adapt<OrderTimeClacInfo>());
|
|
time.ShouldNotBeNull();
|
|
time.ShouldNotBeNull();
|