feat: 添加单元测试web端
This commit is contained in:
21
Yi.Abp.Net8/test/Yi.Abp.Test/Demo/HttpUser_Test.cs
Normal file
21
Yi.Abp.Net8/test/Yi.Abp.Test/Demo/HttpUser_Test.cs
Normal 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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user