public void ReturnsAppropriateStatus(NodeStatus expectedChildStatus, NodeStatus expectedParentStatus)
        {
            var child  = new ReturnXNode(expectedChildStatus);
            var node   = new RepeatUntilFailureNode(child);
            var status = node.Tick();

            Assert.That(status, Is.EqualTo(expectedParentStatus));
        }
        public void HaltsOnChildFailure()
        {
            var child  = new ReturnXNode(NodeStatus.FAILURE);
            var node   = new RepeatUntilFailureNode(child);
            var status = node.Tick();

            Assert.That(child.Halts, Is.EqualTo(1));
        }
        public void TicksChildOncePerTick(int n)
        {
            var child = new ReturnXNode(NodeStatus.SUCCESS);
            var node  = new RepeatUntilFailureNode(child);

            for (int i = 0; i < n; i++)
            {
                node.Tick();
            }

            Assert.That(child.Ticks, Is.EqualTo(n));
        }