Griffon Guide 0.9.5-rc2 - Reference Documentation

# create-unit-test

## Purpose

The `create-unit-test` command will create an unit test for the given base name.

## Examples

    griffon create-unit-test book

## Description

Creates a unit test for the given base name. For example for a base name `book` an unit test called `BookTests` will be created in the `test/unit` directory.

An unit test differs from an integration test in that the Griffon environment is not loaded for each test execution and it is left up to you to perform the appropriate Mocking using GroovyMock or a Mock library such as EasyMock

Refer to the section on Unit Testing of the user guide for information on unit vs. integration testing.

> Note that this command is merely for convenience and you can also create integration tests in your favourite text editor or IDE if you choose.

Usage:

    griffon create-unit-test [name]

Arguments:

- `name` - The name of the test to create.

Options:

- `archetype` - The name of an archetype. Defaults to default.
- `tests` - The name of the unit test template. Defaults to Tests.
- `file-type` - The file type of the artifact, i.e, groovy|java|etc