Generating Models
Define your model
data class Employee(
val id: Long,
val name: String,
val dob: Instant,
)
Generate
- Model
- List
- Set
val forge = ModelForge()
val employee = forge.build<Employee>()
val forge = ModelForge()
val employees = forge.buildList<Employee>(size = 3)
val forge = ModelForge()
val employees = forge.buildSet<Employee>(size = 3)
or by Delegation
- Model
- List
- Set
val employee: Employee by forgery()
val employees: List<Employee> by forgeryList(size = 3)
val employees: List<Employee> by forgerySet(size = 3)