public void Should_Notice_Circled_LinkedNodeList()
        {
            var listWithoutCycle = new LinkedNodeList <int>(new[] { 1, 2, 3, 4, 5 });

            listWithoutCycle.IsCircled().Should().BeFalse();

            var listWithCycle = new LinkedNodeList <int>(new[] { 1, 2, 3, 4, 5 });

            listWithCycle.Last().Next = listWithCycle.Head;
            listWithCycle.IsCircled().Should().BeTrue();
            LinkedNodeUtilities.IsCircled(listWithCycle.Head).Should().BeTrue();
        }
        public void Should_Notice_Circled_LinkedNodeHead()
        {
            var headWithoutCycle = new LinkedNodeList <int>(new[] { 1, 2, 3, 4, 5 }).Head;
            var headWithCycle    = new LinkedNode <int>(2);
            var next             = new LinkedNode <int>(3);

            headWithCycle.Next = next;
            next.Next          = headWithCycle;

            LinkedNodeUtilities.IsCircled(headWithoutCycle).Should().BeFalse();
            LinkedNodeUtilities.IsCircled(headWithCycle).Should().BeTrue();
        }