Example #1
0
        public void RunningChildReturnsRunning()
        {
            var child = new ReturnXNode(NodeStatus.RUNNING);
            var node  = new ForceFailureNode(child);

            var status = node.Tick();

            Assert.That(status, Is.EqualTo(NodeStatus.RUNNING));
        }
Example #2
0
        public void FailureChildReturnsFailure()
        {
            var child = new AlwaysFailureNode();
            var node  = new ForceFailureNode(child);

            var status = node.Tick();

            Assert.That(status, Is.EqualTo(NodeStatus.FAILURE));
        }
Example #3
0
        public void test_failure()
        {
            var testNode = new ForceFailureNode(
                "testNode",
                failureNode.Object);

            Assert.AreEqual(false, testNode.Execute(bContext.Object));

            failureNode.Verify(x => x.Execute(bContext.Object));
        }