Ejemplo n.º 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());
        }
Ejemplo n.º 2
0
 protected void AssertLastColour(OmniColours colour)
 {
     Assert.AreEqual(colour, TestColours.Last());
 }
Ejemplo n.º 3
0
 protected void AssertLastColour(IOmniDecoration decoration)
 {
     AssertEqual(decoration, TestColours.Last());
 }