public void TestClear2() { var logFile = new InMemoryLogFile(); logFile.AddEntry("Hello,", LevelFlags.Info); logFile.AddEntry(" World!", LevelFlags.Warning); logFile.Clear(); logFile.Count.Should().Be(0); }
public void TestClear3() { var logFile = new InMemoryLogFile(); logFile.AddEntry("Hi", LevelFlags.Info); logFile.MaxCharactersPerLine.Should().Be(2); logFile.Clear(); logFile.MaxCharactersPerLine.Should().Be(0); }
public void TestClear4() { var logFile = new InMemoryLogFile(); logFile.AddEntry("Hi", LevelFlags.Info); logFile.MaxCharactersPerLine.Should().Be(2); logFile.AddListener(_listener.Object, TimeSpan.Zero, 1); logFile.Clear(); _modifications.Should().EndWith(LogFileSection.Reset); }
public void TestClear1() { var logFile = new InMemoryLogFile(); logFile.Clear(); logFile.GetValue(LogFileProperties.Size).Should().Be(Size.Zero); logFile.MaxCharactersPerLine.Should().Be(0); logFile.GetValue(LogFileProperties.LastModified).Should().BeNull(); logFile.GetValue(LogFileProperties.StartTimestamp).Should().BeNull(); logFile.GetValue(LogFileProperties.EndTimestamp).Should().BeNull(); logFile.GetValue(LogFileProperties.EmptyReason).Should().Be(ErrorFlags.None); logFile.EndOfSourceReached.Should().BeTrue(); logFile.Count.Should().Be(0); }
public void TestGetLogLineIndexOfOriginalLineIndex2() { var logFile = new InMemoryLogFile(); logFile.GetLogLineIndexOfOriginalLineIndex(0).Should().Be(LogLineIndex.Invalid); logFile.AddEntry("", LevelFlags.All); logFile.GetLogLineIndexOfOriginalLineIndex(0).Should().Be(new LogLineIndex(0)); logFile.GetLogLineIndexOfOriginalLineIndex(1).Should().Be(LogLineIndex.Invalid); logFile.AddEntry("", LevelFlags.All); logFile.GetLogLineIndexOfOriginalLineIndex(0).Should().Be(new LogLineIndex(0)); logFile.GetLogLineIndexOfOriginalLineIndex(1).Should().Be(new LogLineIndex(1)); logFile.Clear(); logFile.GetLogLineIndexOfOriginalLineIndex(0).Should().Be(LogLineIndex.Invalid); logFile.GetLogLineIndexOfOriginalLineIndex(1).Should().Be(LogLineIndex.Invalid); }