|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jmock.lib.RetroNamingScheme
public class RetroNamingScheme
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.
| Field Summary | |
|---|---|
static RetroNamingScheme |
INSTANCE
|
| Constructor Summary | |
|---|---|
RetroNamingScheme()
|
|
| Method Summary | |
|---|---|
java.lang.String |
defaultNameFor(java.lang.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 |
|---|
public static final RetroNamingScheme INSTANCE
| Constructor Detail |
|---|
public RetroNamingScheme()
| Method Detail |
|---|
public java.lang.String defaultNameFor(java.lang.Class<?> typeToMock)
MockObjectNamingScheme
defaultNameFor in interface MockObjectNamingSchemetypeToMock - The type being mocked.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||