I have a rather large collection of classes which check and mutate a given data structure. They can be composed via the composition pattern into arbitrarily complex tree-like structures. The final product contains a lot of these composed structures.
My question is now: How can I test those? Albeit it is easy to test every single unit of these compositions, it is rather expensive to test the whole compositions in the following sense:
- Testing the correct layout of the composition-tree results in a huge number of test cases
- Changes in the compositions result in a very laborious review of every single test case
What is the general guideline here?