feat: 添加单元测试web端

This commit is contained in:
陈淳
2024-01-19 18:08:11 +08:00
parent 226b4ce722
commit 1d777f8704
4 changed files with 71 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Shouldly;
using Xunit;
namespace Yi.Abp.Test.Demo
{
public class HttpUser_Test : YiAbpTestWebBase
{
[Fact]
public void Http_Test()
{
var httpContext = GetRequiredService<IHttpContextAccessor>();
httpContext.HttpContext.Request.Path.ToString().ShouldBe("/test");
}
}
}