private ILogEntry CreateIndex(IReadOnlyLogEntry logEntry) { int numLines; var width = EstimateWidth(logEntry.RawContent, out numLines); var index = new LogEntry2(); index.SetValue(LogFileColumns.RawContentMaxPresentationWidth, width); index.SetValue(LogFileColumns.PresentationLineCount, numLines); return(index); }
public void TestSetValueWrongType() { var entry = new LogEntry2(); new Action(() => entry.SetValue(LogFileColumns.RawContent, 42)).Should().Throw <ArgumentException>(); entry.Columns.Should().BeEmpty(); new Action(() => entry.GetValue(LogFileColumns.RawContent)).Should().Throw <ArgumentException>(); }