|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmock.lib.LastWordNamingScheme
public class LastWordNamingScheme
A naming scheme in which the implicit name for a mock object is the last word of the mocked type's name in lower case. E.g. A mock object of type HelloWorld would be named "world". If the type name is an acronym it is completely lowercased. For example, the type URL would be named "url". Digits and other non-letter characters are left on the end of the word. For example, the type NMEA0183 would be named "nmea0183".
Field Summary | |
---|---|
static MockObjectNamingScheme |
INSTANCE
|
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 MockObjectNamingScheme INSTANCE
Method Detail |
---|
public java.lang.String defaultNameFor(java.lang.Class<?> typeToMock)
MockObjectNamingScheme
defaultNameFor
in interface MockObjectNamingScheme
typeToMock
- The type being mocked.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |