public void RepeatedDeletionIsOkayTest() { var ai = new UtilityAi(); var b = new Behaviour(); b.NameId = "beh"; Assert.That(ai.AddBehaviour(b), Is.True); Assert.That(ai.RemoveBehaviour(b), Is.True); Assert.That(ai.RemoveBehaviour(b), Is.False); }
public void RemoveNonExistentStringBehaviourReturnsFalseTest() { _aic.Clear(); var ai = new UtilityAi("testai", _aic); Assert.That(ai.RemoveBehaviour("some"), Is.False); }
public void RemoveStringBehaviourReturnsTrueTest() { _aic.Clear(); var ai = new UtilityAi("testai", _aic); Assert.That(ai.AddBehaviour("b1"), Is.True); Assert.That(ai.RemoveBehaviour("b1"), Is.True); }
public void RemoveNullBehaviourDoesNotThrowTest() { var ai = new UtilityAi(); Assert.DoesNotThrow(() => ai.RemoveBehaviour((Behaviour)null)); }