Package org.jmock.lib
Class CamelCaseNamingScheme
- java.lang.Object
-
- org.jmock.lib.CamelCaseNamingScheme
-
- All Implemented Interfaces:
MockObjectNamingScheme
public class CamelCaseNamingScheme extends Object implements MockObjectNamingScheme
A naming scheme in which the implicit name for a mock object is the mocked type's name with the first character in lower case. E.g. A mock object of type HelloWorld would be named "helloWorld". Initial acronyms are completely lowercased. For example, the type HTTPClient would be named httpClient. This is the naming scheme used by default.- Author:
- npryce
-
-
Field Summary
Fields Modifier and Type Field Description static CamelCaseNamingScheme
INSTANCE
-
Constructor Summary
Constructors Constructor Description CamelCaseNamingScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
defaultNameFor(Class<?> typeToMock)
Derive a name for a mock object from the name of the given type.
-
-
-
Field Detail
-
INSTANCE
public static final CamelCaseNamingScheme INSTANCE
-
-
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 interfaceMockObjectNamingScheme
- Parameters:
typeToMock
- The type being mocked.- Returns:
- The default name for a mock object of the given type.
-
-