From 494b39f2a20853576c06a793976c7e00605f3d15 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sun, 2 Jun 2024 21:42:14 +0200 Subject: [PATCH] Use Environment.NewLine in Xunit tests --- csharp.xUnit/GildedRoseTests/ApprovalTest.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csharp.xUnit/GildedRoseTests/ApprovalTest.cs b/csharp.xUnit/GildedRoseTests/ApprovalTest.cs index 1b68e4a0..3020c86f 100644 --- a/csharp.xUnit/GildedRoseTests/ApprovalTest.cs +++ b/csharp.xUnit/GildedRoseTests/ApprovalTest.cs @@ -18,7 +18,7 @@ public class ApprovalTest { var fakeoutput = new StringBuilder(); Console.SetOut(new StringWriter(fakeoutput)); - Console.SetIn(new StringReader("a\n")); + Console.SetIn(new StringReader($"a{Environment.NewLine}")); Program.Main(new string[] { "30" }); var output = fakeoutput.ToString();