public void WriteLine_Test() { var host = new ConsoleHostService(); host.Write("Foo"); host.Lines.Dump().Is("t:Foo"); host.WriteLine("Bar"); host.Lines.Dump().Is("t:Foo|t:Bar"); host.WriteLine("Fizz"); host.WriteLine(); host.Lines.Dump().Is( "t:Foo|t:Bar", "t:Fizz", "t:"); host.Write("Buzz"); host.Lines.Dump().Is( "t:Foo|t:Bar", "t:Fizz", "t:", "t:Buzz"); host.WriteLine("Lorem\nIpsum"); host.Lines.Dump(Dump.ForeColor).Is( "t:Foo,f:#cccccc|t:Bar,f:#cccccc", "t:Fizz,f:#cccccc", "t:,f:#cccccc", "t:Buzz,f:#cccccc|t:Lorem,f:#cccccc", "t:Ipsum,f:#cccccc"); }
public void Write_Test() { var host = new ConsoleHostService(); host.Write("Foo"); host.Lines.Dump().Is("t:Foo"); host.Write("Bar"); host.Lines.Dump().Is("t:Foo|t:Bar"); host.Write("Fizz\r\nBuzz"); host.Lines.Dump().Is( "t:Foo|t:Bar|t:Fizz", "t:Buzz"); host.Write("FizzBuzz"); host.Lines.Dump(Dump.ForeColor).Is( "t:Foo,f:#cccccc|t:Bar,f:#cccccc|t:Fizz,f:#cccccc", "t:Buzz,f:#cccccc|t:FizzBuzz,f:#cccccc"); }
public void Clear_Test() { var host = new ConsoleHostService(); host.WriteLine("Foo").WriteLine("Bar"); host.Lines.Dump().Is("t:Foo", "t:Bar"); host.Clear(); host.Lines.Count().Is(0); host.Write("Fizz"); host.Lines.Dump().Is("t:Fizz"); }