public void TestGetLogLineIndexOfOriginalLineIndex2() { using (var proxy = new LogFileProxy(_scheduler, TimeSpan.Zero)) { proxy.GetLogLineIndexOfOriginalLineIndex(new LogLineIndex(9001)) .Should() .Be(LogLineIndex.Invalid, "because the proxy should just return an invalid index when no inner log file is present"); } }
public void TestGetLogLineIndexOfOriginalLineIndex1() { using (var proxy = new LogFileProxy(_scheduler, TimeSpan.Zero, _logFile.Object)) { _logFile.Setup(x => x.GetLogLineIndexOfOriginalLineIndex(It.Is <LogLineIndex>(y => y == 9001))) .Returns(42); proxy.GetLogLineIndexOfOriginalLineIndex(new LogLineIndex(9001)) .Should() .Be(new LogLineIndex(42), "because the proxy should forward all requests to the inner log file, if available"); } }