@Test public void testLowerCamelCaseInvalidWord() { assertFalse(CharFormatUtil.isLowerCamelCase("HelloWorld")); assertFalse(CharFormatUtil.isLowerCamelCase("")); assertFalse(CharFormatUtil.isLowerCamelCase("hello_World")); assertFalse(CharFormatUtil.isLowerCamelCase("1ello_world")); assertFalse(CharFormatUtil.isLowerCamelCase("$elloWorld")); }
@Test public void testKPrefixedVariableNamesNotStartingWithK() { assertFalse(CharFormatUtil.isKPrefixed("validConstantName")); assertFalse(CharFormatUtil.isKPrefixed("AlsoValidConstantName")); }
@Test public void testKPrefixedVariableNamesNotInCamelCase() { assertFalse(CharFormatUtil.isKPrefixed("k_valid_because_not_camel_case")); assertFalse(CharFormatUtil.isKPrefixed("K_valid_because_not_camel_case")); }
@Test public void testKPrefixedValidVariableNamesStartingWithK() { assertFalse(CharFormatUtil.isKPrefixed("koalasEatKale")); assertFalse(CharFormatUtil.isKPrefixed("KoalasEatKale")); assertFalse(CharFormatUtil.isKPrefixed("k")); }
@Test public void testKPrefixedInvalidVariableNamesStartingWithK() { assertTrue(CharFormatUtil.isKPrefixed("KBadConstantName")); assertTrue(CharFormatUtil.isKPrefixed("kBadConstantName")); }
@Test public void testLowerCamelCaseValidWord() { assertTrue(CharFormatUtil.isLowerCamelCase("helloWorld")); }
@Test public void testUpperCamelCaseValidWord() { assertTrue(CharFormatUtil.isUpperCamelCase("HelloWorld")); }