From 1ff9f053848f4259a8d2a813ff99329e2e8958f3 Mon Sep 17 00:00:00 2001 From: T-rav Date: Wed, 19 Sep 2018 11:11:20 +0200 Subject: [PATCH] added missing ApprovalTest.cs and ThirtyDays.txt to csharp project --- csharp/ApprovalTest.cs | 30 ++++ csharp/ThirtyDays.txt | 373 +++++++++++++++++++++++++++++++++++++++++ csharp/csharp.csproj | 6 + 3 files changed, 409 insertions(+) create mode 100644 csharp/ApprovalTest.cs create mode 100644 csharp/ThirtyDays.txt diff --git a/csharp/ApprovalTest.cs b/csharp/ApprovalTest.cs new file mode 100644 index 00000000..2710c604 --- /dev/null +++ b/csharp/ApprovalTest.cs @@ -0,0 +1,30 @@ +using System; +using System.IO; +using System.Text; +using NUnit.Framework; + +namespace csharp +{ + [TestFixture] + public class ApprovalTest + { + [Test] + public void ThirtyDays() + { + var lines = File.ReadAllLines("ThirtyDays.txt"); + + StringBuilder fakeoutput = new StringBuilder(); + Console.SetOut(new StringWriter(fakeoutput)); + Console.SetIn(new StringReader("a\n")); + + Program.Main(new string[] { }); + String output = fakeoutput.ToString(); + + var outputLines = output.Split('\n'); + for(var i = 0; i + @@ -74,6 +75,11 @@ + + + Always + +