Example #1
0
        public void MoveMethod_ShouldReturnFalseInNoNextIndexExists()
        {
            var stringArr = new[] { "a" };
            IListyItaerator <string> sut = new ListyItaerator <string>(stringArr);

            sut.MoveTo();

            Assert.That(() => sut.MoveTo(), Is.False);
        }
Example #2
0
        public void MoveMethod_ShouldReturnTrueIfNextIndexExists()
        {
            var stringArr = new[] { "a", "b" };
            IListyItaerator <string> sut = new ListyItaerator <string>(stringArr);

            Assert.That(() => sut.MoveTo(), Is.True);
        }
Example #3
0
        public void MoveMethod_ShouldIncrementIndex()
        {
            var stringArr                = new[] { "a", "b", "c" };
            int firstIndexPosition       = 1;
            IListyItaerator <string> sut = new ListyItaerator <string>(stringArr);

            sut.MoveTo();

            Assert.That(sut.Index, Is.EqualTo(firstIndexPosition));
        }