public void BehaviourTransitionConstructionTest() { var behaviour = new Behaviour(); behaviour.Selector = new MaxUtilitySelector(); Assert.IsNotNull(behaviour); var action = new BehaviourTransition(behaviour); Assert.IsNotNull(action); }
public void CloneTest() { _aiConstructor.AIs.ClearAll(); var b = new Behaviour("targetBehaviour", _aiConstructor.Behaviours); var t = new BehaviourTransition("b", "targetBehaviour", _aiConstructor.Behaviours); Assert.IsNotNull(t); Assert.IsNotNull(t.Behaviour); Assert.That(t.Behaviour.NameId, Is.EqualTo(b.NameId)); var tc = t.Clone(); Assert.IsNotNull(tc); Assert.That(tc.NameId, Is.EqualTo(t.NameId)); }
public void TargetAiDoesNotExistExceptionTest() { _aiConstructor.AIs.ClearAll(); var t = new BehaviourTransition("transition", "behaviour5", _aiConstructor.Behaviours); Assert.Throws <BehaviourTransition.BehaviourDoesNotExistException>(() => { var s = t.Behaviour; }); var behaviour5 = new Behaviour("behaviour5", _aiConstructor.Behaviours); Assert.DoesNotThrow(() => { var s = t.Behaviour; }); }
public void CollectionConstructorTest() { var t = new BehaviourTransition("transitiontob0", "someBehaviour", _aiConstructor.Behaviours); Assert.IsNotNull(t); }
public void DefaultConstructorTest() { var t = new BehaviourTransition(); Assert.IsNotNull(t); }