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;
namespace HttpClientStudy.UnitTest
{
/// <summary>
/// 使用 xUnit 单元测试框架
/// </summary>
public class UseXUnitTest
{
private readonly ITestOutputHelper _testOutput;
private ILogger _logger;
public UseXUnitTest(ITestOutputHelper outputHelper,ILogger<UseXUnitTest> logger)
{
_testOutput = outputHelper;
_logger = logger;
}
[Fact]
public void UseXUnit_Test()
{
_testOutput.WriteLine("使用 xUnit 单元测试框架!");
_logger.LogError("使用 xUnit 单元测试框架!");
Assert.True(true,"使用 xUnit");
}
}
}