ConsoleLoggerTests LogWarning Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Core
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void LogWarning()
Examples

[Test]
public void LogWarning()
{
    using (var logger = new ConsoleLogger())
    {
        Assert.AreEqual("", console.ToString());
        logger.Write(Logger.MessageType.Warning, "Ohoh");
        Assert.IsTrue(console.ToString().Contains("Warning: Ohoh"), console.ToString());
        logger.Write(Logger.MessageType.Warning, new NullReferenceException().ToString());
        Assert.IsTrue(console.ToString().Contains("NullReferenceException"), console.ToString());
    }
}
See Also