|
@@ -2,7 +2,9 @@
|
|
using Hotline.Application.CallCenter;
|
|
using Hotline.Application.CallCenter;
|
|
using Hotline.Identity.Accounts;
|
|
using Hotline.Identity.Accounts;
|
|
using Hotline.Identity.Roles;
|
|
using Hotline.Identity.Roles;
|
|
|
|
+using Hotline.Orders;
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
using Hotline.Share.Dtos.CallCenter;
|
|
|
|
+using Hotline.Share.Dtos.Order;
|
|
using Hotline.Share.Enums.CallCenter;
|
|
using Hotline.Share.Enums.CallCenter;
|
|
using Hotline.Users;
|
|
using Hotline.Users;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
@@ -14,10 +16,12 @@ namespace Hotline.Application.Tests.Application;
|
|
public class DefaultCallApplicationTest
|
|
public class DefaultCallApplicationTest
|
|
{
|
|
{
|
|
private readonly XingTangCallApplication _defaultCallApplication;
|
|
private readonly XingTangCallApplication _defaultCallApplication;
|
|
|
|
+ private readonly IOrderVisitRepository _orderVisitRepository;
|
|
|
|
|
|
- public DefaultCallApplicationTest(XingTangCallApplication defaultCallApplication)
|
|
|
|
|
|
+ public DefaultCallApplicationTest(XingTangCallApplication defaultCallApplication, IOrderVisitRepository orderVisitRepository)
|
|
{
|
|
{
|
|
_defaultCallApplication = defaultCallApplication;
|
|
_defaultCallApplication = defaultCallApplication;
|
|
|
|
+ _orderVisitRepository = orderVisitRepository;
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|
|
@@ -70,4 +74,16 @@ public class DefaultCallApplicationTest
|
|
result = await _defaultCallApplication.GetCallAsync("2024062419085100943CTI", CancellationToken.None);
|
|
result = await _defaultCallApplication.GetCallAsync("2024062419085100943CTI", CancellationToken.None);
|
|
result.ShouldNotBeNull();
|
|
result.ShouldNotBeNull();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ [Fact]
|
|
|
|
+ public async Task OrderVisitRelevanceCallId_Test()
|
|
|
|
+ {
|
|
|
|
+ var inDto = new VisitDto();
|
|
|
|
+ inDto.CallId = "202411141932330603100751FLOW";
|
|
|
|
+ inDto.Id = "08dd046b-b3b3-4ccf-8a15-09133d27dce0";
|
|
|
|
+ await _defaultCallApplication.OrderVisitRelevanceCallIdAsync(inDto, CancellationToken.None);
|
|
|
|
+
|
|
|
|
+ var visit = await _orderVisitRepository.GetAsync(inDto.Id);
|
|
|
|
+ visit.CallId.ShouldBe("01JCN757M8F3Z9JJPZ0VBSNQPJ");
|
|
|
|
+ }
|
|
}
|
|
}
|