Пример #1
0
        public void EndChild()
        {
            var repeater  = new RepeaterInfinite();
            var childNode = new EventTrackingNode(NodeState.Inactive);

            repeater.Child = childNode;

            repeater.Start();
            repeater.Update();
            repeater.End();

            Assert.AreEqual(true, childNode.HasEnded);
        }
Пример #2
0
        public void EndBeforeUpdate()
        {
            var repeater  = new RepeaterInfinite();
            var childNode = new EventTrackingNode(NodeState.Inactive);

            repeater.Child = childNode;

            repeater.Start();
            repeater.End();

            Assert.AreEqual(false, childNode.HasStarted);
            Assert.AreEqual(false, childNode.HasEnded);
            Assert.AreEqual(0, childNode.UpdatesTotal);
        }
Пример #3
0
        public void ChildEndsWhenRepeaterEnds()
        {
            var repeater  = new RepeaterInfinite(true);
            var childNode = new EventTrackingNode(NodeState.Successful);

            repeater.Child = childNode;

            repeater.Start();
            repeater.Update();
            repeater.Update();
            repeater.Update();
            repeater.End();

            Assert.IsTrue(childNode.HasEnded);
        }