There are several unit tests that can be grouped by placing them inside their own classes, inside the EditModeUnitTests script class.
- TestCorrectValues:
- DefaultHealthOne():Â This tests that the default (initial value) of the player's health is 1.
- HealthCorrectAfterReducedByPointOne():Â This tests that when the player's health is reduced by 0.1, it becomes 0.9.
- HealthCorrectAfterReducedByHalf():Â This tests that when the player's health is reduced by 0.5, it becomes 0.5.
- TestLimitNotExceeded:
- HealthNotExceedMaximumOfOne():Â This tests that the value of the player's health does not exceed 1, even after attempts to add 1, 0.5, and 0.1 to its initial value of 1.
- TestEvents:
- CheckEventFiredWhenAddHealth():Â This tests that an OnChangeHealth() event is published when the player's health is increased.
- CheckEventFiredWhenReduceHealth():Â This tests that an OnChangeHealth() event is published when the player's health...