You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
752 B
C#

using Microsoft.Extensions.Logging;
using Xunit.Abstractions;
9 months ago
namespace HttpClientStudy.UnitTest
{
/// <summary>
8 months ago
/// 使用 xUnit 单元测试框架
9 months ago
/// </summary>
8 months ago
public class UseXUnitTest
9 months ago
{
private readonly ITestOutputHelper _testOutput;
private ILogger _logger;
9 months ago
public UseXUnitTest(ITestOutputHelper outputHelper,ILogger<UseXUnitTest> logger)
9 months ago
{
_testOutput = outputHelper;
_logger = logger;
9 months ago
}
[Fact]
8 months ago
public void UseXUnit_Test()
9 months ago
{
_testOutput.WriteLine("使用 xUnit 单元测试框架!");
_logger.LogError("使用 xUnit 单元测试框架!");
8 months ago
Assert.True(true,"使用 xUnit");
9 months ago
}
}
}