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 CapitlizeNameMapper
25   * 
26   * @author <a href="mailto:martin@mvdb.net">Martin van den Bemt</a>
27   * @version $Id: TestCapitalizeNameMapper.java,v 1.5 2004/02/28 13:38:36 yoavs Exp $
28   */
29  public class TestCapitalizeNameMapper extends TestCase
30  {
31  
32      public static Test suite() {
33          return new TestSuite(TestDecapitalizeNameMapper.class);
34      }
35      
36      public TestCapitalizeNameMapper(String testName) {
37          super(testName);
38      }
39      
40      public void testCapitalize() {
41          CapitalizeNameMapper mapper = new CapitalizeNameMapper();
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  
51