GildedRose-Refactoring-Kata/csharpcore/GildedRoseTests/ApprovalTest.cs
Maxim Stomphorst ad56fa1ce0 cleanup
2023-08-30 21:02:31 +02:00

26 lines
591 B
C#

using System;
using System.IO;
using System.Text;
using ApprovalTests;
using ApprovalTests.Reporters;
using NUnit.Framework;
namespace GildedRoseTests;
[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{Environment.NewLine}"));
TextTestFixture.Main(new string[] { });
var output = fakeOutput.ToString();
Approvals.Verify(output);
}
}