public void WithoutDecoratedNode() { var invert = new InverterNode <int, int>(); Assert.Throws <BehaviourTreeException>(() => { invert.Compile(); }); }
public void ExecutionResult(IBehaviourTreeNode <int, int> node, BehaviourTreeState expectedState) { var invert = new InverterNode <int, int>(); invert.Decorate(node); var func = invert.Compile(); var state = func(0, 0); Assert.Equal(expectedState, state); }
public void ProfilerResult() { var invert = new InverterNode <int, int>(); var profiler = new LogProfiler <int>(); var node = new ActionNode <int, int>("test", (p1, p2) => { return(BehaviourTreeState.Success); }); invert.Decorate(node); invert.Profiler = profiler; var func = invert.Compile(); var state = func(0, 0); // Assert.Equal(expectedState, state); }