public void TestInsertEmptyInvalidIndex([Values(-2, -1, 1, 42)] int invalidIndex) { var entries = new LogBufferList(Core.Columns.DeltaTime); entries.Count.Should().Be(0); new Action(() => entries.InsertEmpty(invalidIndex)).Should().Throw <ArgumentOutOfRangeException>(); entries.Count.Should().Be(0); }
public void TestInsertEmpty2() { var entries = new LogBufferList(Core.Columns.DeltaTime); entries.Add(TimeSpan.FromSeconds(10)); entries.Count.Should().Be(1); entries.InsertEmpty(1); entries.Count.Should().Be(2); entries[0].DeltaTime.Should().Be(TimeSpan.FromSeconds(10)); entries[1].DeltaTime.Should().BeNull(); }
public void TestInsertEmpty1() { var entries = new LogBufferList(Core.Columns.RawContent); entries.Add("Foo"); entries.Count.Should().Be(1); entries.InsertEmpty(1); entries.Count.Should().Be(2); entries[0].RawContent.Should().Be("Foo"); entries[1].RawContent.Should().BeNull(); }