Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jmock.lib
Class RetroNamingScheme

    java.lang.Object
      org.jmock.lib.RetroNamingScheme

All Implemented Interfaces:
  MockObjectNamingScheme

    public class RetroNamingScheme

extends Object
implements MockObjectNamingScheme

A naming scheme in which the implicit name for a mock object is the mocked type's name prepend with "mock". E.g. A mock object of type HelloWorld would be called "mockHelloWorld". This was the naming scheme used at Connextra and in many early examples of TDD with mock objects.

Author:
  npryce

Field Summary
`static RetroNamingScheme` | `INSTANCE`

Constructor Summary
`RetroNamingScheme()`

Method Summary
`String` | `defaultNameFor(Class<?> typeToMock)` Derive a name for a mock object from the name of the given type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INSTANCE

    public static final RetroNamingScheme INSTANCE

Constructor Detail

### RetroNamingScheme

    public RetroNamingScheme()

Method Detail

### defaultNameFor

    public String defaultNameFor(Class<?> typeToMock)

  Description copied from interface: `MockObjectNamingScheme`
  Derive a name for a mock object from the name of the given type.

  Specified by:
    `defaultNameFor` in interface `MockObjectNamingScheme`
  Parameters:
    `typeToMock` - The type being mocked.
  Returns:
    The default name for a mock object of the given type.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD