public void TestColourWrite() { const string colourText = "Hello, world."; const string blankText = "Goodbye, world."; const OmniColours colour = OmniColours.Blue; var decoration = new OmniDecoration(colour); var writer = TestWriter; var message = OmniFactory.BuildMessage(); Assert.IsNotNull(message.AppendLine(decoration, colourText)); Assert.IsNotNull(message.AppendLine(blankText)); Assert.IsNotNull(writer.Write(message)); Assert.AreEqual(TestContents.Count, 2); Assert.AreEqual(TestColours.First(), colour); }
public void TestSimpleWrite() { const string messageTxt = "Hello, world."; var writer = TestWriter; var message = OmniFactory.BuildMessage(); Assert.IsNotNull(message.AppendLine(messageTxt)); Assert.IsNotNull(writer.Write(message)); if (TestContents.Count < 1) { Debugger.Launch(); } Assert.AreEqual(TestContents.Count, 1); Assert.AreEqual(string.Format("{0}{1}", messageTxt, Environment.NewLine), TestContents.First()); }