void AddListFrom(IReadOnlyList <int> collection, IReadOnlyList <int> items, bool reversed, bool isMutated, IReadOnlyList <int> expected) { // Arrange var left = new DoubleLinkedList <int>(collection); var version = left.Version; var right = new DoubleLinkedList <int>(items); // Act left.AddFirstFrom(right, reversed); // Assert left.Count.Should().Be(expected.Count); if (isMutated) { left.Version.Should().NotBe(version); } else { left.Version.Should().Be(version); } left.EnumerateForward().Should().Equal(expected); left.EnumerateReversed().Should().Equal(expected.Reverse()); right.Count.Should().Be(0); }