1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.betwixt.strategy;
18
19 import junit.framework.Test;
20 import junit.framework.TestCase;
21 import junit.framework.TestSuite;
22
23 /***
24 * Test that harnasses the DecapitlizeNameMapper
25 *
26 * @author <a href="mailto:martin@mvdb.net">Martin van den Bemt</a>
27 * @version $Id: TestDecapitalizeNameMapper.java 155402 2005-02-26 12:52:00Z dirkv $
28 */
29 public class TestDecapitalizeNameMapper extends TestCase
30 {
31
32 public static Test suite() {
33 return new TestSuite(TestDecapitalizeNameMapper.class);
34 }
35
36 public TestDecapitalizeNameMapper(String testName) {
37 super(testName);
38 }
39
40 public void testDecapitalize() {
41 DecapitalizeNameMapper mapper = new DecapitalizeNameMapper();
42 String result = mapper.mapTypeToElementName("FOOBAR");
43 assertEquals("FOOBAR", result);
44 result = mapper.mapTypeToElementName("FooBar");
45 assertEquals("fooBar", result);
46 result = mapper.mapTypeToElementName("FOOBar");
47 assertEquals("FOOBar", result);
48 }
49 }
50