mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
29 lines
633 B
C#
29 lines
633 B
C#
using System;
|
|
using System.IO;
|
|
using System.Text;
|
|
using ApprovalTests;
|
|
using ApprovalTests.Reporters;
|
|
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"));
|
|
|
|
Program.Main(new string[] { });
|
|
var output = fakeoutput.ToString();
|
|
|
|
Approvals.Verify(output);
|
|
}
|
|
}
|
|
}
|