public void WriteBlock() { TConsole.WriteBlock("Hello, world!"); TConsole.WriteBlock("Test {0} {2} {1}", "Alpha", "Beta", "Gamma"); var actual = captureOut.ToString(); var expected = "\nHello, world!\n{0}\nTest Alpha Gamma Beta\n{0}".LFormat(Environment.NewLine); Assert.AreEqual(expected, actual); }
public void Mutex() { var tasks = new Task[] { new Task(() => TConsole.WriteBlock("{0}{1}", "Code Of", "Honor")), new Task(() => TConsole.WriteBlockColored(ConsoleColor.DarkYellow, "{0}{1}", "The Best", "Of Both Worlds")), new Task(() => TConsole.WriteColored(ConsoleColor.Blue, "{0}{1}", "The Master", "piece Society")), new Task(() => TConsole.WriteColored(ConsoleColor.Red, ConsoleColor.Green, "{0}{1}", "Encounter At", "Farpoint")), new Task(() => TConsole.WriteLineColored(ConsoleColor.Cyan, "{0}{1}", "Q", "Who?")), new Task(() => TConsole.WriteLineColored(ConsoleColor.Black, ConsoleColor.DarkGray, "{0}{1}", "The Measure", "Of A Man")), new Task(() => TConsole.WriteBlock("{0}{1}", "Code of", "Honor")), }; }