public void TestGetColumn2() { var section = new LogSourceSection(42, 100); var buffer = new string[100]; var logFile = new LogSourceProxy(_taskScheduler, TimeSpan.Zero); logFile.GetColumn(section, Core.Columns.RawContent, buffer); buffer.Should().OnlyContain(x => ReferenceEquals(x, null)); }
public void TestGetColumn3() { var indices = new LogLineIndex[] { 1, 2 }; var buffer = new string[2]; var logFile = new LogSourceProxy(_taskScheduler, TimeSpan.Zero); logFile.GetColumn(indices, Core.Columns.RawContent, buffer); buffer.Should().OnlyContain(x => ReferenceEquals(x, null)); }
public void TestGetColumn1() { var section = new LogSourceSection(42, 100); var buffer = new string[142]; var logFile = new LogSourceProxy(_taskScheduler, TimeSpan.Zero, _logFile.Object); var destinationIndex = 42; var queryOptions = new LogSourceQueryOptions(LogSourceQueryMode.FromCache); logFile.GetColumn(section, Core.Columns.RawContent, buffer, destinationIndex, queryOptions); _logFile.Verify(x => x.GetColumn(It.Is <LogSourceSection>(y => y == section), Core.Columns.RawContent, buffer, destinationIndex, queryOptions), Times.Once); }
public void TestGetOriginalIndexFrom2() { using (var proxy = new LogSourceProxy(_taskScheduler, TimeSpan.Zero, _logFile.Object)) { var buffer = new LogLineIndex[100]; var destinationIndex = 47; var queryOptions = new LogSourceQueryOptions(LogSourceQueryMode.FromCache); proxy.GetColumn(new LogSourceSection(1, 42), Core.Columns.OriginalIndex, buffer, destinationIndex, queryOptions); _logFile.Verify(x => x.GetColumn(It.Is <LogSourceSection>(y => y == new LogSourceSection(1, 42)), Core.Columns.OriginalIndex, buffer, destinationIndex, queryOptions), Times.Once, "because the proxy should simply forward those calls to its source"); } }