Logo Search packages:      
Sourcecode: jmock2 version File versions  Download package

org::jmock::lib::LastWordNamingScheme Class Reference

Inheritance diagram for org::jmock::lib::LastWordNamingScheme:


List of all members.

Detailed Description

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".


Definition at line 20 of file LastWordNamingScheme.java.

Public Member Functions

String defaultNameFor (Class<?> typeToMock)

Static Public Attributes

static MockObjectNamingScheme INSTANCE = new LastWordNamingScheme()

Private Member Functions

int indexOfLastLetter (String simpleName)
int indexOfLastLowerCaseChar (String simpleName, int wordEnd)
int indexOfLastUpperCaseChar (String simpleName, int wordEnd)

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index