Exemplo n.º 1
0
        public void Test1(string input, string output)
        {
            var textWriter = new StringWriter();

            Console.SetOut(textWriter);
            var file = File.ReadAllText(input);

            Console.SetIn(new StringReader(file));
            Wifi.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);
        }