|
@@ -27,22 +27,28 @@ public class OrderVisitRepositoryTest
|
|
|
[Theory]
|
|
|
[InlineData("4", "SMSUnsatisfied", "2" , "不满意")]
|
|
|
[InlineData("1", "Visited", "5", "非常满意")]
|
|
|
+ [InlineData("非常满意", "Visited", "5", "非常满意")]
|
|
|
+ [InlineData("满意", "Visited", "4", "满意")]
|
|
|
+ [InlineData("一般", "Visited", "4", "满意")]
|
|
|
+ [InlineData("不满意", "SMSUnsatisfied", "2", "不满意")]
|
|
|
+ [InlineData("非常不满意", "SMSUnsatisfied", "2", "不满意")]
|
|
|
public async Task UpdateSmsReply_Test(string content, string visitState, string orgResuktKey, string orgResuktValue)
|
|
|
{
|
|
|
var visit = await _orderVisitRepository.Queryable()
|
|
|
.Where(m => m.VisitState == EVisitState.SMSVisiting)
|
|
|
.OrderByDescending(m => m.CreationTime)
|
|
|
.FirstAsync();
|
|
|
+ visit.ShouldNotBeNull("缺少测试数据");
|
|
|
|
|
|
- var dto = new PushReceiveMessageDto { ExternalId = visit.Id, IsSmsReply = true, SmsReplyContent = content };
|
|
|
- var message = new Message();
|
|
|
+ var message = new Message { ExternalId = visit.Id, IsSmsReply = true, SmsReplyContent = content };
|
|
|
+ var dto = new PushReceiveMessageDto();
|
|
|
await _orderVisitRepository.UpdateSmsReplyAsync(dto, message);
|
|
|
visit = _orderVisitRepository.Get(visit.Id);
|
|
|
visit.VisitState.ShouldBe(visitState.ToEnum<EVisitState>());
|
|
|
- visit.NowEvaluate.Key.ShouldBe(content);
|
|
|
+ visit.NowEvaluate.Key.ShouldBe(orgResuktKey);
|
|
|
visit.NowEvaluate.Value.ShouldBe(orgResuktValue);
|
|
|
|
|
|
- if (content == "4" || content == "5")
|
|
|
+ if (content == "4" || content == "5" || content == "不满意" || content == "非常不满意")
|
|
|
visit.VisitType.ShouldBeNull();
|
|
|
|
|
|
await _orderVisitDetailRepository.Queryable()
|