diff --git a/csharpcore/GildedRoseTests/ApprovalTest.cs b/csharpcore/GildedRoseTests/ApprovalTest.cs new file mode 100644 index 00000000..db1dc91c --- /dev/null +++ b/csharpcore/GildedRoseTests/ApprovalTest.cs @@ -0,0 +1,29 @@ +using System; +using System.IO; +using System.Text; +using ApprovalTests; +using ApprovalTests.Reporters; +using GildedRoseTests; +using NUnit.Framework; + +namespace csharp +{ + [UseReporter(typeof(DiffReporter))] + [TestFixture] + public class ApprovalTest + { + [Test] + public void ThirtyDays() + { + + StringBuilder fakeoutput = new StringBuilder(); + Console.SetOut(new StringWriter(fakeoutput)); + Console.SetIn(new StringReader("a\n")); + + TexttestFixture.Main(new string[] { }); + var output = fakeoutput.ToString(); + + Approvals.Verify(output); + } + } +} \ No newline at end of file