1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.contract.mojo; |
17 |
|
|
18 |
|
import java.io.File; |
19 |
|
import java.util.ArrayList; |
20 |
|
import java.util.List; |
21 |
|
import org.junit.After; |
22 |
|
import org.junit.AfterClass; |
23 |
|
import org.junit.Before; |
24 |
|
import org.junit.BeforeClass; |
25 |
|
import org.junit.Test; |
26 |
|
import static org.junit.Assert.*; |
27 |
|
|
28 |
|
|
29 |
|
@author |
30 |
|
|
|
|
| 0% |
Uncovered Elements: 39 (39) |
Complexity: 6 |
Complexity Density: 0.18 |
|
31 |
|
public class KSDictionaryCreatorMojoTest { |
32 |
|
|
33 |
|
private static final String CORE_DIRECTORY = |
34 |
|
"C:/svn/ks-1.3/ks-core/ks-core-api/src/main/java"; |
35 |
|
|
36 |
|
private static final String COMMON_DIRECTORY = |
37 |
|
"C:/svn/ks-1.3/ks-common/ks-common-api/src/main/java"; |
38 |
|
private static final String ENROLL_SRC_MAIN = "C:/svn/ks-1.3/ks-enroll/ks-enroll-api/src/main"; |
39 |
|
private static final String ENROLL_JAVA_DIRECTORY = ENROLL_SRC_MAIN + "/java"; |
40 |
|
private static final String ENROLL_RESOURCES_DIRECTORY = ENROLL_SRC_MAIN + "/resources"; |
41 |
|
; |
42 |
|
private static final String LUM_DIRECTORY = |
43 |
|
"C:/svn/ks-1.3/ks-lum/ks-lum-api/src/main/java"; |
44 |
|
private static final String RICE_DIRECTORY = |
45 |
|
"C:/svn/rice/rice-release-1-0-2-1-br/api/src/main/java"; |
46 |
|
private static final String TEST_SOURCE_DIRECTORY = |
47 |
|
"src/test/java/org/kuali/student/contract/model/test/source"; |
48 |
|
private static final String XML_DICTIONARY_DIRECTORY = "target/xml/dictionary"; |
49 |
|
private static final String RESOURCES_DIRECTORY = |
50 |
|
|
51 |
|
"src/main/resources"; |
52 |
|
private static final String PESC_CORE_MAIN = RESOURCES_DIRECTORY |
53 |
|
+ "/CoreMain_v1.8.0.xsd"; |
54 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
55 |
0
|
public KSDictionaryCreatorMojoTest() {... |
56 |
|
} |
57 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
58 |
0
|
@BeforeClass... |
59 |
|
public static void setUpClass() throws Exception { |
60 |
|
} |
61 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
62 |
0
|
@AfterClass... |
63 |
|
public static void tearDownClass() throws Exception { |
64 |
|
} |
65 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
66 |
0
|
@Before... |
67 |
|
public void setUp() { |
68 |
|
} |
69 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
70 |
0
|
@After... |
71 |
|
public void tearDown() { |
72 |
|
} |
73 |
|
|
74 |
|
|
75 |
|
|
76 |
|
|
|
|
| 0% |
Uncovered Elements: 33 (33) |
Complexity: 1 |
Complexity Density: 0.03 |
4
-
|
|
77 |
0
|
@Test... |
78 |
|
public void testExecute() throws Exception { |
79 |
0
|
System.out.println("execute"); |
80 |
0
|
List<String> srcDirs = new ArrayList<String>(); |
81 |
|
|
82 |
0
|
srcDirs.add(ENROLL_JAVA_DIRECTORY); |
83 |
|
|
84 |
|
|
85 |
|
|
86 |
0
|
KSDictionaryCreatorMojo instance = new KSDictionaryCreatorMojo(); |
87 |
0
|
instance.setSourceDirs(srcDirs); |
88 |
0
|
instance.setOutputDirectory(new File (XML_DICTIONARY_DIRECTORY)); |
89 |
|
|
90 |
|
|
91 |
0
|
instance.setWriteManual(true); |
92 |
0
|
instance.setWriteGenerated(false); |
93 |
0
|
List<String> classNames = new ArrayList(); |
94 |
|
|
95 |
0
|
classNames.add("AtpInfo"); |
96 |
0
|
classNames.add("MilestoneInfo"); |
97 |
0
|
classNames.add("AtpMilestoneRelationInfo"); |
98 |
0
|
classNames.add("AtpAtpRelationInfo"); |
99 |
|
|
100 |
0
|
classNames.add("AcademicCalendarInfo"); |
101 |
0
|
classNames.add("CampusCalendarInfo"); |
102 |
0
|
classNames.add("TermInfo"); |
103 |
0
|
classNames.add("RegistrationDateGroupInfo"); |
104 |
0
|
classNames.add("HolidayInfo"); |
105 |
0
|
classNames.add("KeyDateInfo"); |
106 |
|
|
107 |
0
|
classNames.add("LuiPersonRelationInfo"); |
108 |
|
|
109 |
0
|
classNames.add("HoldInfo"); |
110 |
0
|
classNames.add("IssueInfo"); |
111 |
0
|
classNames.add("RestrictionInfo"); |
112 |
|
|
113 |
0
|
classNames.add("LuiInfo"); |
114 |
0
|
classNames.add("LuiLuiRelationInfo"); |
115 |
0
|
classNames.add("LuiCapacityInfo"); |
116 |
|
|
117 |
0
|
classNames.add("CourseOfferingInfo"); |
118 |
0
|
classNames.add("ActivityOfferingInfo"); |
119 |
0
|
classNames.add("RegistrationGroupInfo"); |
120 |
0
|
classNames.add("SeatPoolDefinitionInfo"); |
121 |
0
|
instance.setClassNames(classNames); |
122 |
0
|
instance.execute(); |
123 |
0
|
assertTrue(new File(instance.getOutputDirectory() + "/" + "ks-AtpInfo-dictionary.xml").exists()); |
124 |
|
} |
125 |
|
} |