chore: slight improvements on test clarity

This commit is contained in:
Syntriax 2025-08-05 09:48:38 +03:00
parent be15cba9e1
commit d0aee7fe16
2 changed files with 7 additions and 2 deletions

View File

@ -133,10 +133,12 @@ public class BehaviourController_Tests
arguments = a;
});
behaviourController.AddBehaviour<BehaviourX>();
BehaviourX behaviour = behaviourController.AddBehaviour<BehaviourX>();
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>();
BehaviourX behaviour = behaviourController.AddBehaviour<BehaviourX>();
behaviourController.RemoveBehaviour<BehaviourX>();
Assert.NotNull(sender);
Assert.NotNull(arguments);
Assert.Equal(behaviourController, sender);
Assert.Equal(behaviour, arguments.Value.BehaviourRemoved);
}
#region Hierarchy Structure

View File

@ -30,6 +30,7 @@ public class Behaviour_Tests
IUniverseObject universeObject = CreateUniverseObject();
BehaviourX behaviourX = universeObject.BehaviourController.AddBehaviour<BehaviourX>();
behaviourX.StateEnable.Enabled = true;
Assert.True(behaviourX.IsActive);
}