예제 #1
0
 public void behavior_node_get_enum_should_yield_next()
 {
     BehaviorNode node = new FakeViewToken();
     var secondNode = new BehaviorChain();
     var thirdNode = new BehaviorChain();
     node.AddAfter(secondNode);
     secondNode.AddAfter(thirdNode);
     var enumerator = node.GetEnumerator();
     enumerator.MoveNext();
     enumerator.Current.ShouldEqual(secondNode);
     enumerator.MoveNext();
     enumerator.Current.ShouldEqual(thirdNode);
     enumerator.MoveNext().ShouldBeFalse();
 }
예제 #2
0
        public void behavior_node_get_enum_should_yield_next()
        {
            BehaviorNode node       = new FakeViewToken();
            var          secondNode = new BehaviorChain();
            var          thirdNode  = new BehaviorChain();

            node.AddAfter(secondNode);
            secondNode.AddAfter(thirdNode);
            var enumerator = node.GetEnumerator();

            enumerator.MoveNext();
            enumerator.Current.ShouldEqual(secondNode);
            enumerator.MoveNext();
            enumerator.Current.ShouldEqual(thirdNode);
            enumerator.MoveNext().ShouldBeFalse();
        }