- splitting code between packages which describe layers, not functionality
- publication all code of module instead of publish only classes which we want allow to be used by other modules,
- creating a lot of test and affection to them what made production code not refactorable,
- focusing on algorithm testing instead of testing module as black box using behavioural or acceptation tests.
Easy example shows that we should put all services and repositories to one package with package scope and don't publish them to the world. Only fasad interface and dto can be published. This way we care only about contract between fasad and its client. This is the place to focuses on test which check all module and its behaviours. Jakub thinks that unit tests which test internal classes of module could be always deleted if there is difficult to correct them after module's code refactoring.
However Kamil noticed that unit tests should test units, not classes, that's why we should care of test code quality the same as about production code.
Resources:
No comments:
Post a Comment