public void Test1(string input, string output) { var textWriter = new StringWriter(); Console.SetOut(textWriter); var file = File.ReadAllText(input); Console.SetIn(new StringReader(file)); Demineur.MyMain(null); var expected = File.ReadAllText(output).Replace("\r\n", "\n"); if (!expected.EndsWith("\n")) { expected = expected + "\n"; } var actual = textWriter.ToString().Replace("\r\n", "\n"); Assert.Equal(expected, actual); }
static void Main() { Demineur m_Demineur = new Demineur(); }