1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
package org.kuali.student.datadictionary.util; |
6 |
|
|
7 |
|
import java.util.Stack; |
8 |
|
import org.junit.After; |
9 |
|
import org.junit.AfterClass; |
10 |
|
import org.junit.Before; |
11 |
|
import org.junit.BeforeClass; |
12 |
|
import org.junit.Test; |
13 |
|
import static org.junit.Assert.*; |
14 |
|
import org.kuali.rice.krad.datadictionary.DataDictionaryDefinitionBase; |
15 |
|
import org.kuali.rice.krad.datadictionary.DataObjectEntry; |
16 |
|
import org.kuali.student.contract.model.test.source.AtpInfo; |
17 |
|
import org.kuali.student.r2.core.exemption.dto.ExemptionInfo; |
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
@author |
22 |
|
|
|
|
| 0% |
Uncovered Elements: 24 (24) |
Complexity: 6 |
Complexity Density: 0.33 |
|
23 |
|
public class Bean2DictionaryConverterTest { |
24 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
25 |
0
|
public Bean2DictionaryConverterTest() {... |
26 |
|
} |
27 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
28 |
0
|
@BeforeClass... |
29 |
|
public static void setUpClass() throws Exception { |
30 |
|
} |
31 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
32 |
0
|
@AfterClass... |
33 |
|
public static void tearDownClass() throws Exception { |
34 |
|
} |
35 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
36 |
0
|
@Before... |
37 |
|
public void setUp() { |
38 |
|
} |
39 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
40 |
0
|
@After... |
41 |
|
public void tearDown() { |
42 |
|
} |
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
|
|
|
| 0% |
Uncovered Elements: 18 (18) |
Complexity: 1 |
Complexity Density: 0.06 |
4
-
|
|
47 |
0
|
@Test... |
48 |
|
public void testConvert() { |
49 |
0
|
System.out.println("convert"); |
50 |
0
|
Class<?> clazz = null; |
51 |
0
|
Stack<DataDictionaryDefinitionBase> parentFields = null; |
52 |
0
|
Stack<Class<?>> parentClasses = null; |
53 |
0
|
Bean2DictionaryConverter instance = null; |
54 |
0
|
DataObjectEntry result = null; |
55 |
|
|
56 |
0
|
clazz = AtpInfo.class; |
57 |
0
|
parentFields = new Stack<DataDictionaryDefinitionBase>(); |
58 |
0
|
parentClasses = new Stack<Class<?>>(); |
59 |
0
|
instance = new Bean2DictionaryConverter(clazz, parentFields, parentClasses); |
60 |
0
|
result = instance.convert(); |
61 |
0
|
assertEquals(13, result.getAttributes().size()); |
62 |
|
|
63 |
0
|
clazz = ExemptionInfo.class; |
64 |
0
|
parentFields = new Stack<DataDictionaryDefinitionBase>(); |
65 |
0
|
parentClasses = new Stack<Class<?>>(); |
66 |
0
|
instance = new Bean2DictionaryConverter(clazz, parentFields, parentClasses); |
67 |
0
|
result = instance.convert(); |
68 |
0
|
assertEquals(22, result.getAttributes().size()); |
69 |
|
} |
70 |
|
} |