コード例 #1
0
        public void RestartsAfterHalt()
        {
            var node = new ReturnStatusFromCollectionNode(NodeStatus.SUCCESS, NodeStatus.FAILURE);

            node.Tick();
            node.Halt();
            var actualStatus = node.Tick();

            Assert.That(actualStatus, Is.EqualTo(NodeStatus.SUCCESS));
        }
コード例 #2
0
        public void HaltCounter(int expectedHalts)
        {
            var node = new ReturnStatusFromCollectionNode(NodeStatus.SUCCESS);

            for (int i = 0; i < expectedHalts; i++)
            {
                node.Halt();
            }

            Assert.That(node.Halts, Is.EqualTo(expectedHalts));
        }