Date: 2019-11-16
Accepted
In some cases it is not possible to enforce the application architecture, design or established conventions using compiler (compile-time). For this reason, code implementations can diverge from the original design and architecture. We want to minimize this behavior, not only by code review.
We decided to implement Unit Tests for our architecture.
We will implement tests for each module separately and one tests library for general architecture. We will use NetArchTest library which was created exactly for this purpose.
- We will have quick feedback about breaking the design rules
- Unit tests for architecture are documenting our architecture to some level
- We will have dependency to external library
- We need to implement some "reflection-based" code to check some rules, because library does not provide everything what we need
- This kind of tests are a bit slower than normal unit tests (because of reflection)
- More tests to maintain