Logger NumberOfRepeatedMessagesIgnored Property Delta Engine Documentation

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

public int NumberOfRepeatedMessagesIgnored { get; }

Property Value

Type: Int32
Remarks

Tests: DeltaEngine.Tests.Core.LoggerTests
Examples

2 unit tests call DeltaEngine.Core.Logger.NumberOfRepeatedMessagesIgnored
[Test]
public void LogInfoMessage()
{
    using (var logger = new MockLogger())
    {
        Assert.IsEmpty(logger.LastMessage);
        Logger.Info("Hello");
        Assert.AreEqual("Hello", logger.LastMessage);
        Assert.AreEqual(0, logger.NumberOfRepeatedMessagesIgnored);
    }
}
[Test]
public void LogSameMessageMultipleTimes()
{
    using (var logger = new MockLogger())
    {
        Logger.Info("Hello");
        Logger.Info("Hello");
        Assert.AreEqual(1, logger.NumberOfRepeatedMessagesIgnored);
    }
}
See Also