Tests for RecyclableArrayList.Contains and RecyclableList.Clear added.

This commit is contained in:
Memek committed 2023-02-06 18:02:50 +01:00
1 parent 360f1c9880
commit 23e92b0521
2 files changed
+33 -2

No files matched your search

@@ -17,7 +17,8 @@ namespace Recyclable.CollectionsTests
// Act
foreach (var item in testData)
{
list.Add(item);
_ = list.Count.Should().Be(item);
}
@@ -285,5 +286,21 @@ namespace Recyclable.CollectionsTests
_ = actual.Should().Be(index - 1);
}
}
[Fact]
public void ContainsShouldFindAllItems()
{
// Prepare
var testData = _testData.ToArray();
using var list = new RecyclableArrayList<int>(testData);
_ = testData.Any().Should().BeTrue("we need items on the list that we can look for");
// Act
foreach (var item in testData)
{
// Validate
_ = list.Contains(item).Should().BeTrue();
}
}
}
}