Several hints removed & code cleaned up.

This commit is contained in:
mlemanczyk committed 2023-05-01 17:45:03 +02:00
1 parent b038bcfdc9
commit 52dc663ada
26 files changed
+107 -139

No files matched your search

@@ -4,7 +4,7 @@ namespace Recyclable.CollectionsTests
{
public class EnumerableWithoutCount<T> : IEnumerable<T>
{
private IEnumerable<T> _testData;
private readonly IEnumerable<T> _testData;
public EnumerableWithoutCount(IEnumerable<T> testData)
{
@@ -127,7 +127,6 @@ namespace Recyclable.CollectionsTests
(9, 0, 1),
}
},
};
}
}
@@ -217,7 +217,6 @@ namespace Recyclable.CollectionsTests
// Validate
_ = list.Count.Should().Be(0);
_ = list.Should().BeEmpty();
}
[Theory]
@@ -350,10 +349,7 @@ namespace Recyclable.CollectionsTests
// Act
var yieldedItems = new List<long>((int)itemsCount);
foreach (var item in list)
{
yieldedItems.Add(item);
}
yieldedItems.AddRange(list);
// Validate
_ = yieldedItems.Count.Should().Be((int)itemsCount);
@@ -549,8 +545,7 @@ namespace Recyclable.CollectionsTests
// Validate
_ = list.Count.Should().Be((int)(itemsCount - deleted));
_ = list.Should().ContainInConsecutiveOrder(testData.Take((int)(itemsCount - deleted)));
}
}
}
}
}
@@ -54,7 +54,6 @@ namespace Recyclable.CollectionsTests
CreateTestData(itemsCount).ToRecyclableList(sourceBlockSize),
itemsCount
};
}
yield return new object[] { $"IList<int>(itemsCount: {itemsCount})", new CustomIList<long>(CreateTestData(itemsCount)), itemsCount };
@@ -64,7 +63,7 @@ namespace Recyclable.CollectionsTests
}
public static IEnumerable<object[]> SourceDataVariants => CreateSourceDataVariants().ToArray();
private static IEnumerable<object[]> CreateSourceEmptyDataVariants() => new[]
{
new object[] { "int[]", Array.Empty<long>() },