1 package org.apache.torque.generator.processor.string;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import static org.junit.Assert.assertEquals;
23
24
25 import org.apache.torque.generator.processor.string.ConstantNameCreator;
26 import org.junit.Before;
27 import org.junit.Test;
28
29 public class ConstantNameCreatorTest
30 {
31 ConstantNameCreator constantNameCreator;
32
33 @Before
34 public void setUp()
35 {
36 constantNameCreator = new ConstantNameCreator();
37 }
38
39 @Test
40 public void testDefault()
41 {
42 String result = constantNameCreator.process("prOceSS-*+ing~#._Test");
43 assertEquals("PR_OCE_SS_ING_TEST", result);
44 }
45
46 @Test
47 public void testFirstCharacterUppercase()
48 {
49 String result = constantNameCreator.process("Process");
50 assertEquals("PROCESS", result);
51 }
52 }