diff --git a/Recyclable.CollectionsTests/RecyclableListTests.cs b/Recyclable.CollectionsTests/RecyclableListTests.cs index 56e79c7..9416e5d 100644 --- a/Recyclable.CollectionsTests/RecyclableListTests.cs +++ b/Recyclable.CollectionsTests/RecyclableListTests.cs @@ -256,7 +256,7 @@ namespace Recyclable.CollectionsTests list.AddRange(testData); // Validate - _ = list.Capacity.Should().Be(16384,"when capacity == 0, then we allocate as much memory as needed, only"); + _ = list.Capacity.Should().Be(16384, "when capacity == 0, then we allocate as much memory as needed, only"); _ = list.Should().HaveCount(testData.Length) .And.ContainInConsecutiveOrder(testData) .And.BeEquivalentTo(testData); @@ -278,5 +278,16 @@ namespace Recyclable.CollectionsTests .And.ContainInConsecutiveOrder(testData) .And.BeEquivalentTo(testData); } + + [Fact] + public void InsertAtTheBeginningShouldMoveItems() + { + // Prepare + var testData = _testData.ToArray(); + var list = new RecyclableList(); + + // Act + _ = Assert.Throws(() => list.Insert(0, -1)); + } } }