1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.kpme.pm.classification;
17
18 import java.math.BigDecimal;
19 import java.util.ArrayList;
20 import java.util.HashMap;
21 import java.util.List;
22 import java.util.Map;
23
24 import org.joda.time.LocalDate;
25 import org.kuali.kpme.pm.api.classification.Classification;
26 import org.kuali.kpme.pm.api.classification.duty.ClassificationDuty;
27 import org.kuali.kpme.pm.api.classification.duty.ClassificationDutyContract;
28 import org.kuali.kpme.pm.api.classification.flag.ClassificationFlag;
29 import org.kuali.kpme.pm.api.classification.qual.ClassificationQualification;
30
31 public class ClassificationDataBoTest {
32 private static Map<String, ClassificationQualification> testClassificationQualificationBos;
33 public static ClassificationQualification.Builder classificationQualificationBoBuilder = ClassificationQualification.Builder
34 .create();
35
36 private static Map<String, ClassificationFlag> testClassificationFlagBos;
37 public static ClassificationFlag.Builder classificationFlagBuilder = ClassificationFlag.Builder.create();
38
39 private static Map<String, ClassificationDuty> testClassificationDutyBos;
40 public static ClassificationDuty.Builder classificationDutyBuilder = ClassificationDuty.Builder.create();
41
42 private static Map<String, Classification> testClassificationBos;
43 public static Classification.Builder classificationBuilder = Classification.Builder.create();
44
45 static LocalDate currentTime = new LocalDate();
46
47
48 static{
49 testClassificationBos = new HashMap<String, Classification>();
50
51 classificationBuilder.setObjectId("0804716a-cbb7-11e3-9cd3-51a754ad6a0a");
52 classificationBuilder.setVersionNumber(1l);
53
54 classificationBuilder.setPmPositionClassId("TST-PMCLASSID");
55 classificationBuilder.setId(classificationBuilder.getPmPositionClassId());
56 classificationBuilder.setPoolEligible("");
57 classificationBuilder.setPositionType("");
58 classificationBuilder.setPositionReportGroup("");
59 classificationBuilder.setLeaveEligible("");
60 classificationBuilder.setBenefitsEligible("");
61 classificationBuilder.setClassificationTitle("");
62 classificationBuilder.setPositionClass("");
63 classificationBuilder.setPercentTime(new BigDecimal(100.0));
64 classificationBuilder.setSalaryGroup("");
65 classificationBuilder.setTenureEligible("");
66 classificationBuilder.setExternalReference("");
67
68 classificationBuilder.setLeavePlan("");
69 classificationBuilder.setPayGrade("");
70 classificationBuilder.setActive(true);
71 classificationBuilder.setEffectiveLocalDate(currentTime);
72
73 testClassificationBos.put(classificationBuilder.getPmPositionClassId(), classificationBuilder.build());
74
75 testClassificationQualificationBos = new HashMap<String, ClassificationQualification>();
76
77 classificationQualificationBoBuilder.setQualificationValue("QLFCTN-VALUE");
78 classificationQualificationBoBuilder.setQualificationType("");
79 classificationQualificationBoBuilder.setDisplayOrder("DISPLAYORDER");
80 classificationQualificationBoBuilder.setTypeValue("");
81 classificationQualificationBoBuilder.setQualifier("QUALIFIER");
82 classificationQualificationBoBuilder.setPmClassificationQualificationId("TST-CLASSFCTNQLFCTN");
83 classificationQualificationBoBuilder.setPmPositionClassId("TST-PMCLASSID");
84 classificationQualificationBoBuilder.setEffectiveLocalDateOfOwner(currentTime);
85
86 classificationQualificationBoBuilder.setVersionNumber(1L);
87 classificationQualificationBoBuilder.setObjectId("0804716a-cbb7-11e3-9cd3-51a754ad6a0a");
88
89 testClassificationQualificationBos.put(classificationQualificationBoBuilder.getPmClassificationQualificationId(), classificationQualificationBoBuilder.build());
90
91 testClassificationFlagBos = new HashMap<String, ClassificationFlag>();
92
93 classificationFlagBuilder.setObjectId("0804716a-cbb7-11e3-9cd3-51a754ad6a0a");
94 classificationFlagBuilder.setVersionNumber(1l);
95 List<String> names = new ArrayList<String>();
96 names.add("Name1");
97 classificationFlagBuilder.setNames(names);
98 classificationFlagBuilder.setCategory("CAT");
99 classificationFlagBuilder.setPmFlagId("TST-CLSFCTNFLAG");
100 classificationFlagBuilder.setPmPositionClassId("TST-PMCLASSID");
101
102 classificationFlagBuilder.setEffectiveLocalDateOfOwner(currentTime);
103 testClassificationFlagBos.put(classificationFlagBuilder.getPmFlagId(), classificationFlagBuilder.build());
104
105
106 testClassificationDutyBos = new HashMap<String, ClassificationDuty>();
107
108 classificationDutyBuilder.setObjectId("0804716a-cbb7-11e3-9cd3-51a754ad6a0a");
109 classificationDutyBuilder.setVersionNumber(1l);
110 classificationDutyBuilder.setName("name");
111 classificationDutyBuilder.setDescription("descr");
112 classificationDutyBuilder.setPercentage(new BigDecimal(100.0));
113 classificationDutyBuilder.setPmDutyId("TST-CLSFCTNDUTY");
114 classificationDutyBuilder.setPmPositionClassId("TST-PMCLASSID");
115
116 classificationDutyBuilder.setEffectiveLocalDateOfOwner(currentTime);
117 testClassificationDutyBos.put(classificationDutyBuilder.getPmDutyId(), classificationDutyBuilder.build());
118 }
119
120 public static Classification getClassification(String classification) {
121 return testClassificationBos.get(classification);
122 }
123
124 public static ClassificationQualification getClassificationQualificationBo(String classificationQualification) {
125 return testClassificationQualificationBos.get(classificationQualification);
126 }
127
128 public static ClassificationFlag getClassificationFlag(String classificationFlag) {
129 return testClassificationFlagBos.get(classificationFlag);
130 }
131
132 public static ClassificationDutyContract getClassificationDuty(String classificationDuty) {
133 return testClassificationDutyBos.get(classificationDuty);
134 }
135
136 }