1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
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