GildedRose-Refactoring-Kata/csharp.NUnit/GildedRoseTests/ApprovalTest.cs
Stef Heyenrath 99f2fcbf18
Refactoring c# projects (#544)
Small Refactoring c# projects, e.g.
* add days
* remove StartupObject
* Fix Approval tests for NUnit
* Use Environment.NewLine in Xunit tests
* Added + fixed README.md
* Removed global.json
2024-06-06 14:13:44 +02:00

28 lines
556 B
C#

using GildedRoseKata;
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using VerifyNUnit;
using NUnit.Framework;
namespace GildedRoseTests;
public class ApprovalTest
{
[Test]
public Task ThirtyDays()
{
var fakeOutput = new StringBuilder();
Console.SetOut(new StringWriter(fakeOutput));
Console.SetIn(new StringReader($"a{Environment.NewLine}"));
Program.Main(new string[] { "30" });
var output = fakeOutput.ToString();
return Verifier.Verify(output);
}
}