24 lines
516 B
C#
24 lines
516 B
C#
|
|
namespace WebApi.Test.Application;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// Application层测试基类
|
|||
|
|
/// </summary>
|
|||
|
|
/// <remarks>
|
|||
|
|
/// 提供通用的测试基础设施,如Mock对象、测试数据构造等
|
|||
|
|
/// </remarks>
|
|||
|
|
public class BaseApplicationTest : BaseTest
|
|||
|
|
{
|
|||
|
|
protected BaseApplicationTest()
|
|||
|
|
{
|
|||
|
|
// 继承BaseTest的ID生成器初始化
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 创建Mock Logger
|
|||
|
|
/// </summary>
|
|||
|
|
protected ILogger<T> CreateMockLogger<T>()
|
|||
|
|
{
|
|||
|
|
return Substitute.For<ILogger<T>>();
|
|||
|
|
}
|
|||
|
|
}
|