public void ParseCharTest_CharFound() { Commandhandler target = new Commandhandler(); char ch = 'K'; string CommandLine = "K is found"; string CommandLineExpected = " is found"; string ResultLine = string.Empty; string ResultLineExpected = string.Empty; bool expected = true; bool actual; actual = target.ParseChar(ch, ref CommandLine, ref ResultLine); Assert.AreEqual(CommandLineExpected, CommandLine); Assert.AreEqual(ResultLineExpected, ResultLine); Assert.AreEqual(expected, actual); }
public void ParseCharTest_CharNotFound() { Commandhandler target = new Commandhandler(); char ch = 'K'; string CommandLine = "Char K is not first char and not found"; string CommandLineExpected = CommandLine; string ResultLine = string.Empty; string ResultLineExpected = " Char 'K' expected"; bool expected = false; bool actual; actual = target.ParseChar(ch, ref CommandLine, ref ResultLine); Assert.AreEqual(CommandLineExpected, CommandLine); Assert.AreEqual(ResultLineExpected, ResultLine); Assert.AreEqual(expected, actual); }