mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-14 22:21:20 +00:00
This is preparation for adding the conjured items - Updated the created Conjured item to allow testing with the new requirement - Changed to work with local expectedOutput file
24 lines
691 B
C#
24 lines
691 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_WithoutConjured.txt");
|
|
expectedOutput.Should().Be(output);
|
|
}
|
|
} |