Changes for page Tips and Tricks

Last modified by chrisby on 2024/04/01 13:11

From version 1.25
edited by chrisby
on 2023/06/05 18:22
Change comment: There is no comment for this version
To version 1.26
edited by chrisby
on 2023/10/12 17:14
Change comment: There is no comment for this version

Summary

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 elements is 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**