Beispiel #1
0
 public void TestGetLogLineIndexOfOriginalLineIndex2()
 {
     using (var proxy = new LogSourceProxy(_taskScheduler, 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");
     }
 }
Beispiel #2
0
        public void TestGetLogLineIndexOfOriginalLineIndex1()
        {
            using (var proxy = new LogSourceProxy(_taskScheduler, 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");
            }
        }