protected override IReadOnlyLogEntry CreateDefault() { // TODO: Swap var buffer = new LogBufferList(Core.Columns.Minimum); buffer.AddEmpty(); return(buffer[0]); }
protected override IReadOnlyLogEntry CreateEmpty() { // TODO: Swap var buffer = new LogBufferList(); buffer.AddEmpty(); return(buffer[0]); }
public void TestClearMany() { var entries = new LogBufferList(Core.Columns.LineNumber); entries.Add(42); entries.Add(9001); entries.Count.Should().Be(2); entries.Clear(); entries.Count.Should().Be(0); entries.AddEmpty(); entries.AddEmpty(); entries.Count.Should().Be(2); entries[0].LineNumber.Should().Be(0); entries[1].LineNumber.Should().Be(0); }
public void TestAddEmpty1() { var entries = new LogBufferList(Core.Columns.LineNumber); entries.AddEmpty(); entries.Count.Should().Be(1); entries[0].LineNumber.Should().Be(0); }
public void TestAddEmpty4() { var entries = new LogBufferList(Core.Columns.DeltaTime); entries.AddEmpty(); entries.Count.Should().Be(1); entries[0].DeltaTime.Should().Be(null); }
public void TestAddEmpty3() { var entries = new LogBufferList(Core.Columns.Timestamp); entries.AddEmpty(); entries.Count.Should().Be(1); entries[0].Timestamp.Should().Be(null); }
public void TestAddEmpty2() { var entries = new LogBufferList(Core.Columns.RawContent); entries.AddEmpty(); entries.Count.Should().Be(1); entries[0].RawContent.Should().Be(null); }
public void TestAddEmpty_InvalidCount() { var entries = new LogBufferList(Core.Columns.RawContent, Core.Columns.LogLevel); entries.Add(new ReadOnlyLogEntry(new Dictionary <IColumnDescriptor, object> { { Core.Columns.RawContent, "I" }, { Core.Columns.LogLevel, LevelFlags.Debug } })); new Action(() => entries.AddEmpty(-1)).Should().Throw <ArgumentOutOfRangeException>(); entries.Count.Should().Be(1); entries[0].RawContent.Should().Be("I"); entries[0].LogLevel.Should().Be(LevelFlags.Debug); }
public void TestAddEmpty() { var entries = new LogBufferList(Core.Columns.Index, Core.Columns.RawContent, Core.Columns.LogLevel); entries.AddEmpty(2); entries.Count.Should().Be(2); entries[0].Index.Should().Be(Core.Columns.Index.DefaultValue); entries[0].RawContent.Should().Be(Core.Columns.RawContent.DefaultValue); entries[0].LogLevel.Should().Be(Core.Columns.LogLevel.DefaultValue); entries[1].Index.Should().Be(Core.Columns.Index.DefaultValue); entries[1].RawContent.Should().Be(Core.Columns.RawContent.DefaultValue); entries[1].LogLevel.Should().Be(Core.Columns.LogLevel.DefaultValue); }