RecyclableList[index] tests added for get.
This commit is contained in:
1 parent
4165c9c6d9
commit
fdea416dc1
1 file changed
+14
@@ -184,6 +184,20 @@ namespace Recyclable.CollectionsTests
|
|||||||
_ = list.Should().ContainInConsecutiveOrder(testData);
|
_ = 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]
|
[Theory]
|
||||||
[MemberData(nameof(RecyclableListTestData.SourceTargetDataVariants), MemberType = typeof(RecyclableListTestData))]
|
[MemberData(nameof(RecyclableListTestData.SourceTargetDataVariants), MemberType = typeof(RecyclableListTestData))]
|
||||||
//[InlineData("Debugging case", new long[1] { 1 }, 1, 2)]
|
//[InlineData("Debugging case", new long[1] { 1 }, 1, 2)]
|
||||||
|
|||||||
Reference in new issue
Block a user