public void TestConvert(string line, string newLine, string nextLine) { var stream = MakeSteamReader(line); _convert = new ADAConvert("TEST.ASM", stream, _settings); // Converter results are .WriteLine, so capture // the console output using (var sw = new StringWriter()) { Console.SetOut(sw); _convert.Process(); var stringReader = new StringReader(sw.ToString()); var result = stringReader.ReadLine().Trim(); result.ShouldEqual(newLine); if (nextLine.Length == 0) { return; } result = stringReader.ReadLine().Trim(); result.ShouldEqual(nextLine); } }
public void TestBit7(string line, string newLine) { var stream = MakeSteamReader(line); _convert = new ADAConvert("TEST.ASM", stream, _settings); _convert.ManageBit7("ON", "", ""); // Converter results are .WriteLine, so capture // the console output using (var sw = new StringWriter()) { Console.SetOut(sw); _convert.Process(); var result = sw.ToString().Trim(); result.ShouldEqual(newLine); } }