gilded-rose-dotnet-core/test/ApprovalTest.cs

29 lines
588 B
C#
Raw Normal View History

2020-08-31 19:36:58 +00:00

using Xunit;
2020-08-31 17:32:41 +00:00
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);
}
}
}
2020-08-31 19:36:58 +00:00