Beispiel #1
0
        public void TestColourClearing()
        {
            const OmniColours colour = OmniColours.BrightCyan;
            var initialColour        = TestWriter.GetDecoration();

            TestWriter.SetDecoration(new OmniDecoration(colour));

            TestWriter.Write("Test01");
            AssertLastColour(colour);

            TestWriter.Write("Test02");
            AssertLastColour(colour);

            TestWriter.ClearDecoration();
            AssertLastColour(initialColour);

            TestWriter.Write(colour, "Test03");
            AssertLastColour(initialColour);

            TestWriter.WriteLine("Test04");
            AssertLastColour(initialColour);

            var message = new ColourMessage();

            message.SetDecoration(new OmniDecoration(colour));
            message.AppendLine("Test05");
            TestWriter.Write(message);

            AssertEqual(initialColour, TestColours.Last());
        }