RTS Testcase 1 Programming guidelines
In short the guidelines are.
- One sandbox test combining all features, implemented using ModelObject system.
- Unit tests for IoC based components
- No Unit tests for simulators, only use them for the sandbox test.
- Simulator hard to test or to big? Convert to component and unit test!
Detailed explanation
All game logic is written using decent 'mh responsibility driven design', also called Inversion of Control. Components implemented are all unit tested (as automated as possible).
Next there is the actual big 'sandbox' test that works with the Simulator and ModelObject framework to combine all these features into the actual RTS game.
Note: is is allowed to make more than 1 sandbox test, but the reason of creating these extra tests should not be for testing features, but for cross cutting concerns like: performance, network sync, … This sandbox test should not be considered a unit test (it isnt a unit test), but more like a sandbox environment.
When should something be in the simulators, and when should something be in the IoC components? When you write a unit test, implement it as a component. There is no point in unit testing simulators.