Changes for page Tips and Tricks
Last modified by chrisby on 2024/04/01 13:11
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -7,7 +7,7 @@ 7 7 *1. **when** (something happens → execute production code) 8 8 *1. **then** (a certain outcome is expected → check the result via assertions) 9 9 ** Alternative common names for the three steps: **arrange, act, assert** 10 -* Use additional **simple high-level checks**. Use additional simple high-level checks. For example, when working with a collection, checking the number of e lementsis a good indicator of unexpected or missing elements.10 +* Use additional **simple high-level checks**. Use additional simple high-level checks. For example, when working with a collection, checking the number of items before examining an item from the collection in detail is a good indicator of unexpected or missing items. 11 11 * **More is better.** When in doubt, it is better to write one test too many than one test too few. Possible duplication is a lesser evil than not testing at all. 12 12 * **Keep test resources close to the tests** to make their use easy to understand. Test resources should be placed in the same location as the test if the resource is only needed by that test. 13 13 * **Avoid threads**