GildedRose-Refactoring-Kata/csharpcore/GildedRoseTests/ApprovalTest.cs
Sarah Ashri bdf20e735c Add new Conjured Items requirement and related tests
Also added some final notes on this solution and suggestions for further changes if we can change Item
2024-03-15 14:36:44 +10:00

24 lines
688 B
C#

using System;
using System.IO;
using System.Text;
using FluentAssertions;
using NUnit.Framework;
namespace GildedRoseTests;
public class ApprovalTest
{
[Test]
public void ThirtyDays()
{
var fakeOutput = new StringBuilder();
Console.SetOut(new StringWriter(fakeOutput));
Console.SetIn(new StringReader($"a{Environment.NewLine}"));
TextTestFixture.Main(new string[] { "30" });
var output = fakeOutput.ToString();
var expectedOutput = File.ReadAllText(@"C:\MyFiles\Training\GildedRose-Refactoring-Kata\csharpcore\GildedRoseTests\ExpectedApprovalTestOutput_WithConjured.txt");
expectedOutput.Should().Be(output);
}
}