Browse Source

Merge branch 'fix/bug_20241106' into test

qinchaoyue 5 tháng trước cách đây
mục cha
commit
b698e66223
1 tập tin đã thay đổi với 15 bổ sung12 xóa
  1. 15 12
      src/Hotline.Application.Tests/Domain/ZiGongExpireTimeTest.cs

+ 15 - 12
src/Hotline.Application.Tests/Domain/ZiGongExpireTimeTest.cs

@@ -1,10 +1,13 @@
-using Hotline.Orders;
+using AngleSharp.Text;
+using Hotline.Orders;
 using Hotline.Settings;
 using Hotline.Settings.TimeLimitDomain;
 using Hotline.Settings.TimeLimitDomain.Repository;
 using Hotline.Share.Dtos.Settings;
 using Hotline.Share.Enums.FlowEngine;
+using Hotline.Share.Enums.Order;
 using Hotline.Share.Enums.Settings;
+using Hotline.Share.Tools;
 using Mapster;
 using Shouldly;
 using XF.Domain.Repository;
@@ -43,16 +46,16 @@ public class ZiGongExpireTimeTest
     //}
 
     [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 order = await _orderRepository.Queryable().Where(m => m.Title == title).FirstAsync();
@@ -60,7 +63,7 @@ public class ZiGongExpireTimeTest
         Enum.TryParse(flowTxt, out EFlowDirection flow);
         var inDto = new OrderTimeClacInfo 
         {
-            //IdentityType = 
+            IdentityType = identityType.ToEnum<EIdentityType>()
         };
         var time = await _ziGongExpireTimeLimit.CalcExpiredTime(beginTime, flow, order.Adapt<OrderTimeClacInfo>());
         time.ShouldNotBeNull();