|
|
|
|
|
namespace OptionStudy.UnitApp
|
|
|
{
|
|
|
//[Startup(typeof(Startup), Shared = false)]
|
|
|
public class UseXunit
|
|
|
{
|
|
|
private readonly ITestOutputHelper? _output;
|
|
|
public UseXunit(ITestOutputHelperAccessor outputHelperAccessor)
|
|
|
{
|
|
|
if (outputHelperAccessor == null)
|
|
|
{
|
|
|
throw new ArgumentNullException(nameof(outputHelperAccessor));
|
|
|
}
|
|
|
_output = outputHelperAccessor.Output;
|
|
|
}
|
|
|
|
|
|
[Fact]
|
|
|
public void UsabilityTest()
|
|
|
{
|
|
|
Assert.True(true, "使用xUnit测试框架!");
|
|
|
_output?.WriteLine("使用 xUnit 框架输出信息测试!");
|
|
|
}
|
|
|
}
|
|
|
} |