mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 20:32:15 +00:00
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
28 lines
556 B
C#
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);
|
|
}
|
|
} |