gilded-rose-dotnet-core/ApprovalTest.cs

27 lines
586 B
C#
Raw Normal View History

2020-08-31 17:32:41 +00:00
using Xunit;
using System;
using System.IO;
using System.Text;
using ApprovalTests;
using ApprovalTests.Reporters;
namespace csharpcore
{
[UseReporter(typeof(DiffReporter))]
public class ApprovalTest
{
[Fact]
public void ThirtyDays()
{
var fakeoutput = new StringBuilder();
Console.SetOut(new StringWriter(fakeoutput));
Console.SetIn(new StringReader("a\n"));
Program.Main(new string[] { });
var output = fakeoutput.ToString();
Approvals.Verify(output);
}
}
}