Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 945 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 945 Bytes
layout title folder permalink categories tags
pattern
Object Mother
object-mother
/patterns/object-mother/
Creational
Java
Difficulty-Beginner

Object Mother

Define a factory of immutable content with separated builder and factory interfaces.

alt text

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

Credits