RecyclableList[index] tests added for get.

This commit is contained in:
mlemanczyk committed 2023-04-10 22:37:15 +02:00
1 parent 4165c9c6d9
commit fdea416dc1
1 file changed
+14
@@ -184,6 +184,20 @@ namespace Recyclable.CollectionsTests
_ = list.Should().ContainInConsecutiveOrder(testData);
}
[Theory]
[MemberData(nameof(RecyclableListTestData.SourceTargetDataVariants), MemberType = typeof(RecyclableListTestData))]
public void GetByIndexShouldReturnCorrectItem(string testCase, IEnumerable<long> testData, long itemsCount, int targetBlockSize)
{
// Prepare
using var list = new RecyclableList<long>(testData, minBlockSize: targetBlockSize);
// Act & Validate
foreach (var item in testData)
{
_ = list[item - 1].Should().Be(item);
}
}
[Theory]
[MemberData(nameof(RecyclableListTestData.SourceTargetDataVariants), MemberType = typeof(RecyclableListTestData))]
//[InlineData("Debugging case", new long[1] { 1 }, 1, 2)]