chore: slight improvements on test clarity
This commit is contained in:
parent
be15cba9e1
commit
d0aee7fe16
@ -133,10 +133,12 @@ public class BehaviourController_Tests
|
|||||||
arguments = a;
|
arguments = a;
|
||||||
});
|
});
|
||||||
|
|
||||||
behaviourController.AddBehaviour<BehaviourX>();
|
BehaviourX behaviour = behaviourController.AddBehaviour<BehaviourX>();
|
||||||
|
|
||||||
Assert.NotNull(sender);
|
Assert.NotNull(sender);
|
||||||
Assert.NotNull(arguments);
|
Assert.NotNull(arguments);
|
||||||
|
Assert.Equal(behaviourController, sender);
|
||||||
|
Assert.Equal(behaviour, arguments.Value.BehaviourAdded);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
@ -153,11 +155,13 @@ public class BehaviourController_Tests
|
|||||||
arguments = a;
|
arguments = a;
|
||||||
});
|
});
|
||||||
|
|
||||||
behaviourController.AddBehaviour<BehaviourX>();
|
BehaviourX behaviour = behaviourController.AddBehaviour<BehaviourX>();
|
||||||
behaviourController.RemoveBehaviour<BehaviourX>();
|
behaviourController.RemoveBehaviour<BehaviourX>();
|
||||||
|
|
||||||
Assert.NotNull(sender);
|
Assert.NotNull(sender);
|
||||||
Assert.NotNull(arguments);
|
Assert.NotNull(arguments);
|
||||||
|
Assert.Equal(behaviourController, sender);
|
||||||
|
Assert.Equal(behaviour, arguments.Value.BehaviourRemoved);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Hierarchy Structure
|
#region Hierarchy Structure
|
||||||
|
@ -30,6 +30,7 @@ public class Behaviour_Tests
|
|||||||
IUniverseObject universeObject = CreateUniverseObject();
|
IUniverseObject universeObject = CreateUniverseObject();
|
||||||
|
|
||||||
BehaviourX behaviourX = universeObject.BehaviourController.AddBehaviour<BehaviourX>();
|
BehaviourX behaviourX = universeObject.BehaviourController.AddBehaviour<BehaviourX>();
|
||||||
|
behaviourX.StateEnable.Enabled = true;
|
||||||
|
|
||||||
Assert.True(behaviourX.IsActive);
|
Assert.True(behaviourX.IsActive);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user