mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 12:22:12 +00:00
Add approval test to csharpcore
This commit is contained in:
parent
8dee58f73d
commit
588dbed420
29
csharpcore/GildedRoseTests/ApprovalTest.cs
Normal file
29
csharpcore/GildedRoseTests/ApprovalTest.cs
Normal file
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user