public void TestAddListener1() { var logFile = new InMemoryLogFile(); logFile.AddListener(_listener.Object, TimeSpan.Zero, 1); _modifications.Should().Equal(new object[] { LogFileSection.Reset }); }
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 TestAddListener2() { var logFile = new InMemoryLogFile(); logFile.AddEntry("Foo", LevelFlags.Other); logFile.AddListener(_listener.Object, TimeSpan.Zero, 1); _modifications.Should().Equal(new object[] { LogFileSection.Reset, new LogFileSection(0, 1) }); }
public void TestAddMultilineEntry4() { var logFile = new InMemoryLogFile(); logFile.AddListener(_listener.Object, TimeSpan.Zero, 2); var t1 = new DateTime(2017, 11, 26, 11, 56, 0); logFile.AddMultilineEntry(LevelFlags.Info, t1, "foo", "bar"); _modifications.Should().Equal(new object[] { LogFileSection.Reset, new LogFileSection(0, 2) }); }