示例#1
0
        public void MoveNext_returns_true_for_true_bits_and_false_when_end_is_reached()
        {
            var enumerator = new VarVec.VarVecEnumerator(CreateVarVec(1));

            Assert.True(enumerator.MoveNext());
            Assert.False(enumerator.MoveNext());
        }
示例#2
0
        public void Current_returns_the_var_at_the_current_position_or_null_if_position_is_outside_array()
        {
            var enumerator = new VarVec.VarVecEnumerator(CreateVarVec(1));

            Assert.Null(enumerator.Current);
            enumerator.MoveNext();
            Assert.Equal(1, enumerator.Current.Id);
            enumerator.MoveNext();
            Assert.Null(enumerator.Current);
        }