Relative Content

Tag Archive for javaunit-testingdesign-patternsintegration-testing

Design Patterns and Testing – Create a Thing only if multiple criteria are satisfied

If the business rules state that [some Thing] should only be created if ten conditions are met, it seems crazy to write a test for each true/false permutation of those conditions. For example if I wanted to test that a Thing is not created when only 9/10 conditions are satisfied, I’d have to to set up the test data in such a way that the first eight conditions are satisfied.