/** Test of toHyphenCase method, of class CodicUtils. */ @Test public void testToHyphenCase() { assertEquals(null, CodicUtils.toHyphenCase(null)); assertEquals("", CodicUtils.toHyphenCase("")); assertEquals("hyphen", CodicUtils.toHyphenCase("hyphen")); assertEquals("to-hyphen-case", CodicUtils.toHyphenCase("to hyphen case")); }
/** Test of toCamelCase method, of class CodicUtils. */ @Test public void testToCamelCase() { assertEquals(null, CodicUtils.toCamelCase(null)); assertEquals("", CodicUtils.toCamelCase("")); assertEquals("camel", CodicUtils.toCamelCase("camel")); assertEquals("toCamelCase", CodicUtils.toCamelCase("to camel case")); }
/** Test of toLowerUnderscoreCase method, of class CodicUtils. */ @Test public void testToLowerUnderscoreCase() { assertEquals(null, CodicUtils.toLowerUnderscoreCase(null)); assertEquals("", CodicUtils.toLowerUnderscoreCase("")); assertEquals("lower", CodicUtils.toLowerUnderscoreCase("lower")); assertEquals( "to_lower_underscore_case", CodicUtils.toLowerUnderscoreCase("to lower underscore case")); }
/** Test of toPascalCase method, of class CodicUtils. */ @Test public void testToPascalCase() { assertEquals(null, CodicUtils.toPascalCase(null)); assertEquals("", CodicUtils.toPascalCase("")); assertEquals("AbcXyz", CodicUtils.toPascalCase("abc xyz")); assertEquals("ToPascalCase", CodicUtils.toPascalCase("to pascal case")); assertEquals("ABanana", CodicUtils.toPascalCase("a banana")); }
/** Test of toUpperUnderscoreCase method, of class CodicUtils. */ @Test public void testToUpperUnderscoreCase() { assertEquals(null, CodicUtils.toUpperUnderscoreCase(null)); assertEquals("", CodicUtils.toUpperUnderscoreCase("")); assertEquals("UPPER", CodicUtils.toUpperUnderscoreCase("upper")); assertEquals( "TO_UPPER_UNDERSCORE_CASE", CodicUtils.toUpperUnderscoreCase("to upper underscore case")); }
/** Test of containsFullwidth method, of class CodicUtils. */ @Test public void testContainsFullwidth() { assertTrue(CodicUtils.containsFullwidth("ひらがな")); assertTrue(CodicUtils.containsFullwidth("カタカナ")); assertTrue(CodicUtils.containsFullwidth("漢字")); assertTrue(CodicUtils.containsFullwidth("123")); assertTrue(CodicUtils.containsFullwidth("テスト123abc")); assertFalse(CodicUtils.containsFullwidth("abc123-?!")); }