HasNext() public method

The has next.
public HasNext ( ) : bool
return bool
        public void HasNextTest()
        {
            int lengthCut = 3;
            int step = 1;
            int countSteps = 0;

            var iterator = new EndIterator(complexChain, lengthCut, step);
            while (iterator.HasNext())
            {
                iterator.Next();
                countSteps = countSteps + 1;
            }

            Assert.AreEqual(countSteps, iterator.MaxShifts);

            countSteps = 0;
            iterator = new EndIterator(complexChain, lengthCut, step + 1);
            while (iterator.HasNext())
            {
                iterator.Next();
                countSteps = countSteps + 1;
            }

            Assert.True(countSteps == iterator.MaxShifts);
        }
        /// <summary>
        /// The filter out.
        /// </summary>
        /// <param name="sequence">
        /// The sequence.
        /// </param>
        /// <returns>
        /// The <see cref="int"/>.
        /// </returns>
        public int FilterOut(List<string> sequence)
        {
            int hits = 0;
            EndIterator iterator;
            iterator = new EndIterator(Chain, sequence.Count, Interfaces.Seeker.Step);

            while (iterator.HasNext())
            {
                List<string> temp = iterator.Next();
                bool chainsEquals = sequence.Count == temp.Count;
                for (int i = 0; i < sequence.Count; i++)
                {
                    if (temp[i] != sequence[i])
                    {
                        chainsEquals = false;
                    }
                }

                if (chainsEquals)
                {
                    Chain.Remove(iterator.Position(), sequence.Count);
                    hits = hits + 1;
                }
            }

            return hits;
        }
        public void ResetTest()
        {
            int lengthCut = 2;
            int step = 1;
            int index = 0;
            int position = 6;
            var list1 = new List<string>
                {
                    "ABABAB",
                    "ABATAT",
                    "TABABAB",
                    "ABTABAB",
                    "ABABAB",
                    "ABABAB",
                    "ABABAB"
                };
            var chain = new ComplexChain(list1);
            var iterator = new EndIterator(chain, lengthCut, step);
            while (iterator.HasNext())
            {
                iterator.Next();
                index = index + 1;
            }

            iterator.Reset();

            Assert.True(iterator.Position() == position);
        }