diff --git a/Engine.Tests/Core/BehaviourController_Tests.cs b/Engine.Tests/Core/BehaviourController_Tests.cs index 3fca482..3256f96 100644 --- a/Engine.Tests/Core/BehaviourController_Tests.cs +++ b/Engine.Tests/Core/BehaviourController_Tests.cs @@ -133,10 +133,12 @@ public class BehaviourController_Tests arguments = a; }); - behaviourController.AddBehaviour(); + BehaviourX behaviour = behaviourController.AddBehaviour(); Assert.NotNull(sender); Assert.NotNull(arguments); + Assert.Equal(behaviourController, sender); + Assert.Equal(behaviour, arguments.Value.BehaviourAdded); } [Fact] @@ -153,11 +155,13 @@ public class BehaviourController_Tests arguments = a; }); - behaviourController.AddBehaviour(); + BehaviourX behaviour = behaviourController.AddBehaviour(); behaviourController.RemoveBehaviour(); Assert.NotNull(sender); Assert.NotNull(arguments); + Assert.Equal(behaviourController, sender); + Assert.Equal(behaviour, arguments.Value.BehaviourRemoved); } #region Hierarchy Structure diff --git a/Engine.Tests/Core/Behaviour_Tests.cs b/Engine.Tests/Core/Behaviour_Tests.cs index 56cd9a7..eb60af2 100644 --- a/Engine.Tests/Core/Behaviour_Tests.cs +++ b/Engine.Tests/Core/Behaviour_Tests.cs @@ -30,6 +30,7 @@ public class Behaviour_Tests IUniverseObject universeObject = CreateUniverseObject(); BehaviourX behaviourX = universeObject.BehaviourController.AddBehaviour(); + behaviourX.StateEnable.Enabled = true; Assert.True(behaviourX.IsActive); }