(Quick Reference)

create-mock

Purpose

The create-mock generates a mock for a domain class

Examples

grails create-mock Person
grails create-mock "*"

Description

Given at least one domain class, this command creates a mock for it. The file will be placed in the src/groovy{classPackage}/{domainClass}.groovy file.

Usage:

grails create-mock [domainClass]

Arguments:

  • domainClass - Either a domain class name (case-sensitive) without its package or a wildcard (*). If you specify the wildcard the artifacts will be generated for all domain classes.