ConsoleLogger DoNotSkipMessagesIfTooManyAreWrittenEachSecond Property Delta Engine Documentation

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

public bool DoNotSkipMessagesIfTooManyAreWrittenEachSecond { get; set; }

Property Value

Type: Boolean
Remarks

Tests: DeltaEngine.Tests.Core.ConsoleLoggerTests
Examples

2 unit tests call DeltaEngine.Core.ConsoleLogger.DoNotSkipMessagesIfTooManyAreWrittenEachSecond
[Test]
public void RegisteringLoggerInTheSameThreadTwiceIsNotAllowed()
{
    using (var logger = new ConsoleLogger())
    {
        logger.DoNotSkipMessagesIfTooManyAreWrittenEachSecond = true;
        Logger.Info("La la la");
        using (new ConsoleLogger()) { }
    }
[Test]
public void WriteSkipMessages()
{
    using (var logger = new ConsoleLogger())
    {
        Assert.AreEqual("", console.ToString());
        logger.Write(Logger.MessageType.Info, "FirstMessage");
        logger.DoNotSkipMessagesIfTooManyAreWrittenEachSecond = false;
        Assert.IsFalse(logger.DoNotSkipMessagesIfTooManyAreWrittenEachSecond);
        Time.Total = -1;
        logger.Write(Logger.MessageType.Info, "Hello");
        Assert.IsTrue(console.ToString().Contains("FirstMessage"), console.ToString());
    }
}
See Also