public class LastWordNamingScheme extends java.lang.Object implements MockObjectNamingScheme
Modifier and Type | Field and Description |
---|---|
static MockObjectNamingScheme |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
LastWordNamingScheme() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
defaultNameFor(java.lang.Class<?> typeToMock)
Derive a name for a mock object from the name of the given type.
|
private int |
indexOfLastLetter(java.lang.String simpleName) |
private int |
indexOfLastLowerCaseChar(java.lang.String simpleName,
int wordEnd) |
private int |
indexOfLastUpperCaseChar(java.lang.String simpleName,
int wordEnd) |
public static MockObjectNamingScheme INSTANCE
public java.lang.String defaultNameFor(java.lang.Class<?> typeToMock)
MockObjectNamingScheme
defaultNameFor
in interface MockObjectNamingScheme
typeToMock
- The type being mocked.private int indexOfLastLetter(java.lang.String simpleName)
private int indexOfLastUpperCaseChar(java.lang.String simpleName, int wordEnd)
private int indexOfLastLowerCaseChar(java.lang.String simpleName, int wordEnd)