gilded-rose-dotnet-core/ApprovalTest.cs
2020-08-31 19:32:41 +02:00

27 lines
586 B
C#

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);
}
}
}