Extended Camel Case is used in some fixtures, to have fewer rules about what (ASCII) characters are permitted. It allows for arbitrary characters in the header names of columns or the names of actions. Each character that is not valid in a Java identifier is converted into a word (with a leading space).
For example:
Name in table | Partial conversion | Converted to program identifier |
one day | one day | oneDay |
one + day | one plus day | onePlusDay |
+ | plus | plus |
#{ | hash left brace | hashLeftBrace |
:-) | colon minus right parenthesis | colonMinusRightParenthesis |
%age | percent age | percentAge |
% age | percent age | percentAge |
age% | age percent | agePercent |
cost in $s | cost in dollars | costInDollars |
hire @ | hire at | hireAt |
For examples of the use of ExtendedCamelCase, see DoFixture and CalculateFixture.
The character conversions are as follows:
char | word(s) with leading space |
! | bang |
" | quote |
# | hash |
$ | dollar |
% | percent |
& | ampersand |
' | single quote |
( | left parenthesis |
) | right parenthesis |
* | star |
+ | plus |
, | comma |
- | minus |
. | dot |
/ | slash |
: | colon |
; | semicolon |
< | less than |
> | greater than |
= | equals |
? | question |
@ | at |
[ | left square bracket |
] | right square bracket |
\ | backslash |
^ | caret |
` | backquote |
{ | left brace |
} | right brace |
| bar (not usable with wiki) |
~ | tilde |
But isn't it a pain to work out what the name of the method is if there are lots of special characters?
Just write an empty fixture class and run Fit. It will tell you the method expected; you can copy it from the error message and paste it into your code.
RickMugridge