mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 16:58:47 +00:00
f597fc1b07
* Fix languages * Missed change for version number * Add language field for presentation * Revert change in README for double buffer Co-authored-by: Jackie Nim <=>
layout, title, folder, permalink, categories, language, tags
| layout | title | folder | permalink | categories | language | tags | |
|---|---|---|---|---|---|---|---|
| pattern | Object Mother | object-mother | /patterns/object-mother/ | Creational | en |
|
Object Mother
Define a factory of immutable content with separated builder and factory interfaces.
Class diagram
Applicability
Use the Object Mother pattern when
- You want consistent objects over several tests
- You want to reduce code for creation of objects in tests
- Every test should run with fresh data
