Esempio n. 1
0
        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");
        }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        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");
        }