1 package org.kuali.student.lum.statement.service.impl;
2
3 import java.util.List;
4
5 import org.junit.Assert;
6 import org.junit.Test;
7 import org.kuali.student.common.exceptions.DoesNotExistException;
8 import org.kuali.student.common.test.spring.AbstractTransactionalDaoTest;
9 import org.kuali.student.common.test.spring.Dao;
10 import org.kuali.student.common.test.spring.PersistenceFileLocation;
11 import org.kuali.student.core.statement.dao.StatementDao;
12 import org.kuali.student.core.statement.entity.NlUsageType;
13 import org.kuali.student.core.statement.entity.OrderedReqComponentType;
14 import org.kuali.student.core.statement.entity.OrderedStatementType;
15 import org.kuali.student.core.statement.entity.ReqComponentFieldType;
16 import org.kuali.student.core.statement.entity.ReqComponentType;
17 import org.kuali.student.core.statement.entity.ReqComponentTypeNLTemplate;
18 import org.kuali.student.core.statement.entity.StatementType;
19
20 @PersistenceFileLocation("classpath:META-INF/statement-persistence.xml")
21 public class TestStatementServiceConfiguration extends AbstractTransactionalDaoTest {
22 @Dao(value = "org.kuali.student.core.statement.dao.impl.StatementDaoImpl", testSqlFile = "classpath:ks-statement.sql")
23 public StatementDao dao;
24
25 private boolean containsStatementType(List<OrderedStatementType> typeList, String id) {
26 for(OrderedStatementType type : typeList) {
27 if(type.getChildStatementType().getId().equals(id)) {
28 return true;
29 }
30 }
31 return false;
32 }
33
34 @Test
35 public void testStatementTypeCount() {
36 List<StatementType> statementTypes = this.dao.find(StatementType.class);
37 Assert.assertEquals(15, statementTypes.size());
38 }
39
40 @Test
41 public void testValidStatementSubTypesForCourse() throws DoesNotExistException {
42 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course");
43 List<OrderedStatementType> subTypes = statementType.getAllowedStatementTypes();
44 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.enrollmentEligibility"));
45 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.creditConstraints"));
46 }
47
48 @Test
49 public void testValidStatementSubTypesForEnrollmentEligibility() throws DoesNotExistException {
50 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.enrollmentEligibility");
51 List<OrderedStatementType> subTypes = statementType.getAllowedStatementTypes();
52 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.academicReadiness.studentEligibilityPrereq"));
53 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.academicReadiness.coreq"));
54 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.recommendedPreparation"));
55 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.academicReadiness.antireq"));
56 }
57
58 @Test
59 public void testValidStatementSubTypesForCreditConstraints() throws DoesNotExistException {
60 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.creditConstraints");
61 List<OrderedStatementType> subTypes = statementType.getAllowedStatementTypes();
62 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.credit.restriction"));
63 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.course.credit.repeatable"));
64 }
65
66 @Test
67 public void testValidStatementSubTypesForProgram() throws DoesNotExistException {
68 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program");
69 List<OrderedStatementType> subTypes = statementType.getAllowedStatementTypes();
70 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.program.entrance"));
71 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.program.satisfactoryProgress"));
72 Assert.assertTrue(containsStatementType(subTypes, "kuali.statement.type.program.completion"));
73 }
74
75 @Test
76 public void testStatementSubTypesForCourseStatementType() throws DoesNotExistException {
77 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course");
78 Assert.assertEquals(2, statementType.getAllowedStatementTypes().size());
79 }
80
81 @Test
82 public void testStatementSubTypesForProgramStatementType() throws DoesNotExistException {
83 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program");
84 Assert.assertEquals(3, statementType.getAllowedStatementTypes().size());
85 }
86
87 @Test
88 public void testReqComponentTypeCount() {
89 List<ReqComponentType> reqComponentTypes = this.dao.find(ReqComponentType.class);
90 Assert.assertEquals(42, reqComponentTypes.size());
91 }
92
93 @Test
94 public void testReqComponentFieldTypeCount() {
95 List<ReqComponentFieldType> reqComponentFieldTypes = this.dao.find(ReqComponentFieldType.class);
96 Assert.assertEquals(18, reqComponentFieldTypes.size());
97 }
98
99 @Test
100 public void testReqComponentTypeNLTemplateCount() {
101 List<ReqComponentTypeNLTemplate> reqComponentTypeNLTemplates = this.dao.find(ReqComponentTypeNLTemplate.class);
102 Assert.assertEquals(168, reqComponentTypeNLTemplates.size());
103 }
104
105 @Test
106 public void testNlUsageTypeCount() {
107 List<NlUsageType> nlUsageTypes = this.dao.find(NlUsageType.class);
108 Assert.assertEquals(5, nlUsageTypes.size());
109 }
110
111 private boolean containsNlUsageType(List<NlUsageType> typeList, String id) {
112 for(NlUsageType type : typeList) {
113 if(type.getId().equals(id)) {
114 return true;
115 }
116 }
117 return false;
118 }
119
120 @Test
121 public void testValidNlUsageTypes() {
122 List<NlUsageType> nlUsageTypes = this.dao.find(NlUsageType.class);
123 Assert.assertTrue(containsNlUsageType(nlUsageTypes, "KUALI.CATALOG"));
124 Assert.assertTrue(containsNlUsageType(nlUsageTypes, "KUALI.RULE"));
125 Assert.assertTrue(containsNlUsageType(nlUsageTypes, "KUALI.RULE.PREVIEW"));
126 Assert.assertTrue(containsNlUsageType(nlUsageTypes, "KUALI.RULE.EXAMPLE"));
127 Assert.assertTrue(containsNlUsageType(nlUsageTypes, "KUALI.RULE.COMPOSITION"));
128 }
129
130 private boolean containsReqComponentType(List<OrderedReqComponentType> typeList, String id) {
131 for(OrderedReqComponentType type : typeList) {
132 if(type.getReqComponentType().getId().equals(id)) {
133 return true;
134 }
135 }
136 return false;
137 }
138
139 @Test
140 public void testReqComponentTypesForAntireqType() throws DoesNotExistException {
141 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.antireq");
142 Assert.assertEquals(5, statementType.getAllowedReqComponentTypes().size());
143 }
144
145 @Test
146 public void testValidReqComponentTypesForAntireqType() throws DoesNotExistException {
147 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.antireq");
148 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
149 Assert.assertEquals("kuali.reqComponent.type.course.notcompleted", types.get(0).getReqComponentType().getId());
150 Assert.assertEquals("kuali.reqComponent.type.course.courseset.completed.none", types.get(1).getReqComponentType().getId());
151 Assert.assertEquals("kuali.reqComponent.type.course.courseset.credits.completed.none", types.get(2).getReqComponentType().getId());
152 Assert.assertEquals("kuali.reqComponent.type.course.courseset.credits.completed.max", types.get(3).getReqComponentType().getId());
153 Assert.assertEquals("kuali.reqComponent.type.course.test.score.max", types.get(4).getReqComponentType().getId());
154 }
155
156 @Test
157 public void testReqComponentTypesForPrereqType() throws DoesNotExistException {
158 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.prereq");
159 Assert.assertEquals(13, statementType.getAllowedReqComponentTypes().size());
160 }
161
162 @Test
163 public void testValidReqComponentTypesForPrereqType() throws DoesNotExistException {
164 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.prereq");
165 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
166 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.completed.all"));
167 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.completed.nof"));
168 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.credits.completed.nof"));
169 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.gpa.min"));
170 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.grade.min"));
171 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.grade.max"));
172 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.permission.org.required"));
173 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.permission.instructor.required"));
174 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.test.score.min"));
175 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.nof.grade.min"));
176 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.admitted.org.duration"));
177 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.org.credits.completed.min"));
178 }
179
180 @Test
181 public void testReqComponentTypesForCoreqType() throws DoesNotExistException {
182 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.coreq");
183 Assert.assertEquals(2, statementType.getAllowedReqComponentTypes().size());
184 }
185
186 @Test
187 public void testValidReqComponentTypesForCoreqType() throws DoesNotExistException {
188 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.coreq");
189 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
190
191
192 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.enrolled.nof"));
193 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.enrolled"));
194 }
195
196 @Test
197 public void testReqComponentTypesForStudentEligibilityType() throws DoesNotExistException {
198 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.studentEligibility");
199 Assert.assertEquals(4, statementType.getAllowedReqComponentTypes().size());
200 }
201
202 @Test
203 public void testValidReqComponentTypesForStudentEligibilityType() throws DoesNotExistException {
204 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.studentEligibilityPrereq");
205 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
206
207
208 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.notadmitted.org.duration"));
209 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.org.program.admitted"));
210 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.notadmitted"));
211 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.admitted"));
212 }
213
214 @Test
215 public void testReqComponentTypesForStudentEligibilityPreReqType() throws DoesNotExistException {
216 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.studentEligibilityPrereq");
217 Assert.assertEquals(17, statementType.getAllowedReqComponentTypes().size());
218 }
219
220 @Test
221 public void testValidReqComponentTypesForStudentEligibilityPreReqType() throws DoesNotExistException {
222 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.academicReadiness.studentEligibilityPrereq");
223 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
224
225
226 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.notadmitted.org.duration"));
227 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.org.program.admitted"));
228 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.notadmitted"));
229 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.admitted"));
230 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.completed"));
231 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.completed.all"));
232 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.completed.nof"));
233 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.credits.completed.nof"));
234 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.gpa.min"));
235 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.grade.min"));
236 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.grade.max"));
237 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.permission.org.required"));
238 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.permission.instructor.required"));
239 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.test.score.min"));
240 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.nof.grade.min"));
241 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.program.admitted.org.duration"));
242 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.org.credits.completed.min"));
243 }
244
245 @Test
246 public void testReqComponentTypesForRepeatableForCreditType() throws DoesNotExistException {
247 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.credit.repeatable");
248 Assert.assertEquals(1, statementType.getAllowedReqComponentTypes().size());
249 }
250
251 @Test
252 public void testValidReqComponentTypesForRepeatableForCreditType() throws DoesNotExistException {
253 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.credit.repeatable");
254 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
255 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.credits.repeat.max"));
256 }
257
258 @Test
259 public void testReqComponentTypesForRecommendedPreparationType() throws DoesNotExistException {
260 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.recommendedPreparation");
261 Assert.assertEquals(2, statementType.getAllowedReqComponentTypes().size());
262 }
263
264 @Test
265 public void testValidReqComponentTypesForRecommendedPreparationType() throws DoesNotExistException {
266 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.recommendedPreparation");
267 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
268 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.org.credits.completed.min"));
269 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.completed"));
270 }
271
272 @Test
273 public void testReqComponentTypesForCoursesThatRestrictCreditType() throws DoesNotExistException {
274 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.credit.restriction");
275 Assert.assertEquals(2, statementType.getAllowedReqComponentTypes().size());
276 }
277
278 @Test
279 public void testValidReqComponentTypesForCoursesThatRestrictCreditType() throws DoesNotExistException {
280 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.course.credit.restriction");
281 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
282 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.completed.none"));
283 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.notcompleted"));
284 }
285
286 @Test
287 public void testReqComponentTypesForProgramSatisfactoryProgressType() throws DoesNotExistException {
288 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program.satisfactoryProgress");
289 Assert.assertEquals(7, statementType.getAllowedReqComponentTypes().size());
290 }
291
292 @Test
293 public void testValidReqComponentTypesForProgramSatisfactoryProgressType() throws DoesNotExistException {
294 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program.satisfactoryProgress");
295 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
296 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.admitted.credits"));
297 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.credits.max"));
298 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.completion.duration"));
299 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.candidate.status.duration"));
300 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.nof.grade.min"));
301 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.cumulative.gpa.min"));
302 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.duration.gpa.min"));
303 }
304
305 @Test
306 public void testReqComponentTypesForProgramEntranceType() throws DoesNotExistException {
307 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program.entrance");
308 Assert.assertEquals(19, statementType.getAllowedReqComponentTypes().size());
309 }
310
311 @Test
312 public void testValidReqComponentTypesForProgramEntranceType() throws DoesNotExistException {
313 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program.entrance");
314 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
315 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.completed.nof"));
316 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.notcompleted.nof"));
317 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.completed.all"));
318 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.coursecompleted.nof"));
319 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.gpa.min"));
320 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.test.score.min"));
321 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.admitted.credits"));
322 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.minor.admitted.classstanding"));
323 }
324
325 @Test
326 public void testReqComponentTypesForProgramCompletionType() throws DoesNotExistException {
327 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program.completion");
328 Assert.assertEquals(18, statementType.getAllowedReqComponentTypes().size());
329 }
330
331 @Test
332 public void testValidReqComponentTypesForProgramCompletionType() throws DoesNotExistException {
333 StatementType statementType = this.dao.fetch(StatementType.class, "kuali.statement.type.program.completion");
334 List<OrderedReqComponentType> types = statementType.getAllowedReqComponentTypes();
335 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.completed.nof"));
336 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.completed.all"));
337 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.programset.coursecompleted.nof"));
338 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.course.courseset.gpa.min"));
339 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.credits.min"));
340 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.residence.credits.final"));
341 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.enrolled.credits.final"));
342 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.completion.duration.afterentry"));
343 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.minors.nof"));
344 Assert.assertTrue(containsReqComponentType(types, "kuali.reqComponent.type.program.cumulative.gpa.min"));
345 }
346
347 private boolean containsReqComponentFieldType(List<ReqComponentFieldType> typeList, String id) {
348 for(ReqComponentFieldType type : typeList) {
349 if(type.getId().equals(id)) {
350 return true;
351 }
352 }
353 return false;
354 }
355
356 @Test
357 public void testReqComponentFieldTypeCountForReqComponentType_course_courseset_completed_none() throws DoesNotExistException {
358 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.completed.none");
359 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
360 }
361
362 @Test
363 public void testReqComponentFieldTypeForReqComponentType_course_courseset_completed_none() throws DoesNotExistException {
364 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.completed.none");
365 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
366 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
367 }
368
369 @Test
370 public void testReqComponentFieldTypeCountForReqComponentType_reqCompFieldType_cluSet_id() throws DoesNotExistException {
371 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.completed.all");
372 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
373 }
374
375 @Test
376 public void testReqComponentFieldTypeForReqComponentType_reqCompFieldType_cluSet_id() throws DoesNotExistException {
377 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.completed.all");
378 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
379 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
380 }
381
382 @Test
383 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_completed_nof() throws DoesNotExistException {
384 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.completed.nof");
385 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
386 }
387
388 @Test
389 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_completed_nof() throws DoesNotExistException {
390 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.completed.nof");
391 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
392 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
393 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
394 }
395
396 @Test
397 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_enrolled_nof() throws DoesNotExistException {
398 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.enrolled.nof");
399 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
400 }
401
402 @Test
403 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_enrolled_nof() throws DoesNotExistException {
404 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.enrolled.nof");
405 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
406 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
407 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
408 }
409
410 @Test
411 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_credits_completed_nof() throws DoesNotExistException {
412 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.credits.completed.nof");
413 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
414 }
415
416 @Test
417 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_credits_completed_nof() throws DoesNotExistException {
418 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.credits.completed.nof");
419 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
420 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
421 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
422 }
423
424 @Test
425 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_credits_completed_none() throws DoesNotExistException {
426 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.credits.completed.none");
427 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
428 }
429
430 @Test
431 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_credits_completed_none() throws DoesNotExistException {
432 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.credits.completed.none");
433 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
434 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
435 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
436 }
437
438 @Test
439 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_credits_completed_max() throws DoesNotExistException {
440 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.credits.completed.max");
441 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
442 }
443
444 @Test
445 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_credits_completed_max() throws DoesNotExistException {
446 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.credits.completed.max");
447 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
448 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
449 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
450 }
451
452 @Test
453 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_gpa_min() throws DoesNotExistException {
454 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.gpa.min");
455 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
456 }
457
458 @Test
459 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_gpa_min() throws DoesNotExistException {
460 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.gpa.min");
461 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
462 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
463 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.gpa"));
464 }
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518 @Test
519 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_grade_min() throws DoesNotExistException {
520 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.grade.min");
521 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
522 }
523
524 @Test
525 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_grade_min() throws DoesNotExistException {
526 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.grade.min");
527 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
528 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
529 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.grade.id"));
530 }
531
532 @Test
533 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_grade_max() throws DoesNotExistException {
534 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.grade.max");
535 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
536 }
537
538 @Test
539 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_grade_max() throws DoesNotExistException {
540 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.grade.max");
541 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
542 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
543 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.grade.id"));
544 }
545
546 @Test
547 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_permission_org_required() throws DoesNotExistException {
548 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.permission.org.required");
549 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
550 }
551
552 @Test
553 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_permission_org_required() throws DoesNotExistException {
554 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.permission.org.required");
555 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
556 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.org.id"));
557 }
558
559 @Test
560 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_permission_instructor_required() throws DoesNotExistException {
561 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.permission.instructor.required");
562 Assert.assertEquals(0, reqComponentType.getReqCompFieldTypes().size());
563 }
564
565
566
567
568
569
570
571
572 @Test
573 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_test_score_min() throws DoesNotExistException {
574 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.test.score.min");
575 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
576 }
577
578 @Test
579 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_test_score_min() throws DoesNotExistException {
580 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.test.score.min");
581 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
582 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.test.cluSet.id"));
583 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.test.score"));
584 }
585
586 @Test
587 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_test_score_max() throws DoesNotExistException {
588 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.test.score.max");
589 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
590 }
591
592 @Test
593 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_test_score_max() throws DoesNotExistException {
594 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.test.score.max");
595 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
596 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.test.cluSet.id"));
597 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.test.score"));
598 }
599
600 @Test
601 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_course_courseset_nof_grade_min() throws DoesNotExistException {
602 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.nof.grade.min");
603 Assert.assertEquals(3, reqComponentType.getReqCompFieldTypes().size());
604 }
605
606 @Test
607 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_course_courseset_nof_grade_min() throws DoesNotExistException {
608 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.courseset.nof.grade.min");
609 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
610 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
611 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.cluSet.id"));
612 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.grade.id"));
613 }
614
615 @Test
616 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_program_admitted_org_duration() throws DoesNotExistException {
617 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.admitted.org.duration");
618 Assert.assertEquals(5, reqComponentType.getReqCompFieldTypes().size());
619 }
620
621 @Test
622 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_program_admitted_org_duration() throws DoesNotExistException {
623 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.admitted.org.duration");
624 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
625 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
626 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
627 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.org.id"));
628 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.duration"));
629 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.durationType.id"));
630 }
631
632 @Test
633 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_program_notadmitted_org_duration() throws DoesNotExistException {
634 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.notadmitted.org.duration");
635 Assert.assertEquals(5, reqComponentType.getReqCompFieldTypes().size());
636 }
637
638 @Test
639 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_program_notadmitted_org_duration() throws DoesNotExistException {
640 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.notadmitted.org.duration");
641 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
642 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
643 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
644 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.org.id"));
645 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.duration"));
646 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.durationType.id"));
647 }
648
649 @Test
650 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_org_program_admitted() throws DoesNotExistException {
651 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.org.program.admitted");
652 Assert.assertEquals(0, reqComponentType.getReqCompFieldTypes().size());
653 }
654
655 @Test
656 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_program_notadmitted() throws DoesNotExistException {
657 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.notadmitted");
658 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
659 }
660
661 @Test
662 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_program_notadmitted() throws DoesNotExistException {
663 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.notadmitted");
664 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
665 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
666 }
667
668 @Test
669 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_program_admitted() throws DoesNotExistException {
670 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.admitted");
671 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
672 }
673
674 @Test
675 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_program_admitted() throws DoesNotExistException {
676 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.program.admitted");
677 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
678 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
679 }
680
681 @Test
682 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_credits_repeat_max() throws DoesNotExistException {
683 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.credits.repeat.max");
684 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
685 }
686
687 @Test
688 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_credits_repeat_max() throws DoesNotExistException {
689 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.credits.repeat.max");
690 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
691 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
692 }
693
694 @Test
695 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_org_credits_completed_min() throws DoesNotExistException {
696 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.org.credits.completed.min");
697 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
698 }
699
700 @Test
701 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_org_credits_completed_min() throws DoesNotExistException {
702 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.org.credits.completed.min");
703 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
704 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
705 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.org.id"));
706 }
707
708
709
710
711
712 @Test
713 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_programset_completed_nof() throws DoesNotExistException {
714 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.completed.nof");
715 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
716 }
717
718 @Test
719 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_programset_completed_nof() throws DoesNotExistException {
720 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.completed.nof");
721 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
722 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
723 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
724 }
725
726 @Test
727 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_programset_notcompleted_nof() throws DoesNotExistException {
728 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.notcompleted.nof");
729 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
730 }
731
732 @Test
733 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_programset_notcompleted_nof() throws DoesNotExistException {
734 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.notcompleted.nof");
735 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
736 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
737 }
738
739 @Test
740 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_programset_completed_all() throws DoesNotExistException {
741 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.completed.all");
742 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
743 }
744
745 @Test
746 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_programset_completed_all() throws DoesNotExistException {
747 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.completed.all");
748 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
749 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
750 }
751
752 @Test
753 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_programset_coursecompleted_nof() throws DoesNotExistException {
754 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.coursecompleted.nof");
755 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
756 }
757
758 @Test
759 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_programset_coursecompleted_nof() throws DoesNotExistException {
760 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.programset.coursecompleted.nof");
761 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
762 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
763 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.cluSet.id"));
764 }
765
766 @Test
767 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_admitted_credits() throws DoesNotExistException {
768 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.admitted.credits");
769 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
770 }
771
772 @Test
773 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_admitted_credits() throws DoesNotExistException {
774 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.admitted.credits");
775 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
776 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
777 }
778
779 @Test
780 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_credits_min() throws DoesNotExistException {
781 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.credits.min");
782 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
783 }
784
785 @Test
786 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_credits_min() throws DoesNotExistException {
787 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.credits.min");
788 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
789 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
790 }
791
792 @Test
793 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_credits_max() throws DoesNotExistException {
794 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.credits.max");
795 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
796 }
797
798 @Test
799 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_credits_max() throws DoesNotExistException {
800 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.credits.max");
801 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
802 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
803 }
804
805 @Test
806 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_completion_duration() throws DoesNotExistException {
807 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.completion.duration");
808 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
809 }
810
811 @Test
812 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_completion_duration() throws DoesNotExistException {
813 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.completion.duration");
814 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
815 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.duration"));
816 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.durationType.id"));
817 }
818
819 @Test
820 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_candidate_status_duration() throws DoesNotExistException {
821 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.candidate.status.duration");
822 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
823 }
824
825 @Test
826 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_candidate_status_duration() throws DoesNotExistException {
827 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.candidate.status.duration");
828 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
829 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.duration"));
830 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.durationType.id"));
831 }
832
833 @Test
834 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqCompType_program_completion_duration_afterentry() throws DoesNotExistException {
835 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.completion.duration.afterentry");
836 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
837 }
838
839 @Test
840 public void testReqComponentFieldTypeForReqComponentType_kuali_reqCompType_program_completion_duration_afterentry() throws DoesNotExistException {
841 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.completion.duration.afterentry");
842 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
843 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.duration"));
844 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.durationType.id"));
845 }
846
847 @Test
848 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_program_residence_credits_final() throws DoesNotExistException {
849 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.residence.credits.final");
850 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
851 }
852
853 @Test
854 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_program_residence_credits_final() throws DoesNotExistException {
855 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.residence.credits.final");
856 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
857 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.clu.id"));
858 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
859 }
860
861 @Test
862 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_program_enrolled_credits_final() throws DoesNotExistException {
863 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.enrolled.credits.final");
864 Assert.assertEquals(2, reqComponentType.getReqCompFieldTypes().size());
865 }
866
867 @Test
868 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_program_enrolled_credits_final() throws DoesNotExistException {
869 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.enrolled.credits.final");
870 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
871 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.program.clu.id"));
872 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
873 }
874
875 @Test
876 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_program_minors_nof() throws DoesNotExistException {
877 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.minors.nof");
878 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
879 }
880
881 @Test
882 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_program_minors_nof() throws DoesNotExistException {
883 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.minors.nof");
884 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
885 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.value.positive.integer"));
886 }
887
888 @Test
889 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_program_minor_admitted_classstanding() throws DoesNotExistException {
890 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.program.minor.admitted.classstanding");
891 Assert.assertEquals(0, reqComponentType.getReqCompFieldTypes().size());
892 }
893
894 @Test
895 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_completed() throws DoesNotExistException {
896 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.completed");
897 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
898 }
899
900 @Test
901 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_completed() throws DoesNotExistException {
902 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.completed");
903 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
904 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.clu.id"));
905 }
906
907 @Test
908 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_enrolled() throws DoesNotExistException {
909 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.enrolled");
910 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
911 }
912
913 @Test
914 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_enrolled() throws DoesNotExistException {
915 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.enrolled");
916 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
917 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.clu.id"));
918 }
919
920 @Test
921 public void testReqComponentFieldTypeCountForReqComponentType_kuali_reqComponent_type_course_notcompleted() throws DoesNotExistException {
922 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.notcompleted");
923 Assert.assertEquals(1, reqComponentType.getReqCompFieldTypes().size());
924 }
925
926 @Test
927 public void testReqComponentFieldTypeForReqComponentType_kuali_reqComponent_type_course_notcompleted() throws DoesNotExistException {
928 ReqComponentType reqComponentType = this.dao.fetch(ReqComponentType.class, "kuali.reqComponent.type.course.notcompleted");
929 List<ReqComponentFieldType> types = reqComponentType.getReqCompFieldTypes();
930 Assert.assertTrue(containsReqComponentFieldType(types, "kuali.reqComponent.field.type.course.clu.id"));
931 }
932 }