public void ConditionFromBlackboard_Green() { BT.BT bt = new BT.BT(null); bt.BlackBoard.SetValue("foo", 10); bt.BlackBoard.SetValue("bar", 10); var dec = new BlackBoardCondition <IntCondition, int>("foo", "bar", ConditionType.Equal); Assert.That(dec.OnNodeCondition(bt), Is.EqualTo(true)); }
public void CoditionLess_Red() { BT.BT bt = new BT.BT(null); bt.BlackBoard.SetValue("foo", 0); bt.BlackBoard.SetValue("bar", 200); var dec = new BlackBoardCondition <IntCondition, int>("bar", "foo", ConditionType.Less); Assert.That(dec.OnNodeCondition(bt), Is.EqualTo(false)); }