Test RecyclableList.ConstructorSourceShouldInitializeList added.
This commit is contained in:
1 parent
230401a56b
commit
d4a63d5d33
1 file changed
+15
-1
@@ -169,7 +169,7 @@ namespace Recyclable.CollectionsTests
|
|||||||
using var list = NewRecyclableList;
|
using var list = NewRecyclableList;
|
||||||
|
|
||||||
// Act & Validate
|
// Act & Validate
|
||||||
foreach(var index in _testData)
|
foreach (var index in _testData)
|
||||||
{
|
{
|
||||||
var actual = list.IndexOf(index);
|
var actual = list.IndexOf(index);
|
||||||
_ = actual.Should().Be(index - 1);
|
_ = actual.Should().Be(index - 1);
|
||||||
@@ -308,5 +308,19 @@ namespace Recyclable.CollectionsTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Fact]
|
||||||
|
public void ConstructorSourceShouldInitializeList()
|
||||||
|
{
|
||||||
|
// Prepare
|
||||||
|
var testData = _testData.ToArray();
|
||||||
|
|
||||||
|
// Act
|
||||||
|
var list = new RecyclableList<int>(testData);
|
||||||
|
|
||||||
|
// Validate
|
||||||
|
_ = list.Should().HaveCount(testData.Length)
|
||||||
|
.And.ContainInConsecutiveOrder(testData)
|
||||||
|
.And.BeEquivalentTo(testData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user