|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| package org.jconfig.utils; |
|
8 |
| |
|
9 |
| import junit.framework.TestCase; |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| public class CategoryBeanMapperTest extends TestCase { |
|
14 |
| |
|
15 |
| |
|
16 |
| |
|
17 |
| |
|
18 |
| |
|
19 |
0
| public CategoryBeanMapperTest(String arg0) {
|
|
20 |
0
| super(arg0);
|
|
21 |
| } |
|
22 |
| |
|
23 |
0
| public static void main(String[] args) {
|
|
24 |
0
| junit.textui.TestRunner.run(CategoryBeanMapperTest.class);
|
|
25 |
| } |
|
26 |
| |
|
27 |
0
| public void testMapBean() {
|
|
28 |
0
| JDBCBeanHelper helper = new JDBCBeanHelper();
|
|
29 |
0
| CategoryBeanMapper.mapBean(helper,"JDBC","default");
|
|
30 |
0
| assertEquals("dice",helper.getUSER());
|
|
31 |
| } |
|
32 |
| |
|
33 |
0
| public void testMapBean2() {
|
|
34 |
0
| SimpleTypeBeanHelper helper = new SimpleTypeBeanHelper();
|
|
35 |
0
| CategoryBeanMapper.mapBean(helper,"simpleTypes","default");
|
|
36 |
0
| assertEquals('C',helper.getCharValue());
|
|
37 |
0
| assertEquals(1,helper.getIntValue());
|
|
38 |
0
| assertTrue(helper.getDoubleValue()==12.3);
|
|
39 |
0
| assertEquals(326781,helper.getLongValue());
|
|
40 |
| } |
|
41 |
| |
|
42 |
| } |