Files
CliFx/CliFx.Tests/SpecsBase.cs
2021-12-08 23:43:35 +02:00

22 lines
503 B
C#

using System;
using CliFx.Infrastructure;
using CliFx.Tests.Utils.Extensions;
using Xunit.Abstractions;
namespace CliFx.Tests;
public abstract class SpecsBase : IDisposable
{
public ITestOutputHelper TestOutput { get; }
public FakeInMemoryConsole FakeConsole { get; } = new();
protected SpecsBase(ITestOutputHelper testOutput) =>
TestOutput = testOutput;
public void Dispose()
{
FakeConsole.DumpToTestOutput(TestOutput);
FakeConsole.Dispose();
}
}