Files
CliFx/CliFx.Tests/SpecsBase.cs
2023-08-22 21:20:04 +03:00

22 lines
496 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();
}
}