Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


Guidelines on Unit tests can be found in Unit Old unit test guidelines.

Java Related

Coding style


Or by running the ./ script, which includes a step to update file heades.

Dependency injection

Classes should have all their external dependencies, including configurations, injected through the constructor. This allows the creator of the class to define the external dependencies, which is very relevant for testing purposes.

The dependencies should be access through provider classes allowing the creator to dynamically decide when instances should be created or reused. So a constructor example could be: 

Code Block
public JobSupervisor(Provider<JobDAO> jobDaoProvider, Provider<Long> jobTimeoutProvider) {

Further reading:

Other guidelines

Children Display