1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
package org.kuali.student.kim.identity.mock; |
6 |
|
|
7 |
|
import static org.junit.Assert.assertEquals; |
8 |
|
import static org.junit.Assert.assertNull; |
9 |
|
|
10 |
|
import java.util.Arrays; |
11 |
|
import java.util.HashMap; |
12 |
|
import java.util.List; |
13 |
|
import java.util.Map; |
14 |
|
|
15 |
|
import org.junit.After; |
16 |
|
import org.junit.AfterClass; |
17 |
|
import org.junit.Before; |
18 |
|
import org.junit.BeforeClass; |
19 |
|
import org.junit.Test; |
20 |
|
import org.kuali.rice.kim.bo.entity.dto.KimEntityDefaultInfo; |
21 |
|
import org.kuali.rice.kim.bo.entity.dto.KimEntityInfo; |
22 |
|
import org.kuali.rice.kim.bo.entity.dto.KimEntityPrivacyPreferencesInfo; |
23 |
|
import org.kuali.rice.kim.bo.entity.dto.KimPrincipalInfo; |
24 |
|
import org.kuali.rice.kim.bo.reference.dto.AddressTypeInfo; |
25 |
|
import org.kuali.rice.kim.bo.reference.dto.AffiliationTypeInfo; |
26 |
|
import org.kuali.rice.kim.bo.reference.dto.EmailTypeInfo; |
27 |
|
import org.kuali.rice.kim.bo.reference.dto.EmploymentStatusInfo; |
28 |
|
import org.kuali.rice.kim.bo.reference.dto.EmploymentTypeInfo; |
29 |
|
import org.kuali.rice.kim.bo.reference.dto.EntityNameTypeInfo; |
30 |
|
import org.kuali.rice.kim.bo.reference.dto.EntityTypeInfo; |
31 |
|
import org.kuali.rice.kim.bo.reference.dto.ExternalIdentifierTypeInfo; |
32 |
|
import org.kuali.rice.kim.bo.reference.dto.PhoneTypeInfo; |
33 |
|
import org.kuali.student.kim.identity.mock.AddressTypeEnum; |
34 |
|
import org.kuali.student.kim.identity.mock.AffiliationTypeEnum; |
35 |
|
import org.kuali.student.kim.identity.mock.EmailTypeEnum; |
36 |
|
import org.kuali.student.kim.identity.mock.EmployeeStatusEnum; |
37 |
|
import org.kuali.student.kim.identity.mock.EmployeeTypeEnum; |
38 |
|
import org.kuali.student.kim.identity.mock.EntityNameTypeEnum; |
39 |
|
import org.kuali.student.kim.identity.mock.EntityTypeEnum; |
40 |
|
import org.kuali.student.kim.identity.mock.ExternalIdentifierTypeEnum; |
41 |
|
import org.kuali.student.kim.identity.mock.IdentityServiceConstants; |
42 |
|
import org.kuali.student.kim.identity.mock.PersonEnum; |
43 |
|
import org.kuali.student.kim.identity.mock.PhoneTypeEnum; |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
@author |
48 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (200) |
Complexity: 30 |
Complexity Density: 0.18 |
|
49 |
|
public class TestIdentityServiceMockImpl { |
50 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
51 |
25
|
public TestIdentityServiceMockImpl() {... |
52 |
|
} |
53 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
54 |
1
|
@BeforeClass... |
55 |
|
public static void setUpClass() throws Exception { |
56 |
|
} |
57 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
58 |
1
|
@AfterClass... |
59 |
|
public static void tearDownClass() throws Exception { |
60 |
|
} |
61 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
62 |
25
|
@Before... |
63 |
|
public void setUp() { |
64 |
|
} |
65 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
66 |
25
|
@After... |
67 |
|
public void tearDown() { |
68 |
|
} |
69 |
|
|
70 |
|
|
71 |
|
|
72 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
73 |
1
|
@Test... |
74 |
|
public void testGetAddressType() { |
75 |
1
|
|
76 |
1
|
String code = AddressTypeEnum.HOME.getCode(); |
77 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
78 |
1
|
AddressTypeInfo result = instance.getAddressType(code); |
79 |
1
|
assertEquals(code, result.getCode()); |
80 |
|
} |
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
85 |
1
|
@Test... |
86 |
|
public void testGetAffiliationType() { |
87 |
1
|
|
88 |
1
|
String code = AffiliationTypeEnum.STAFF.getCode(); |
89 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
90 |
1
|
AffiliationTypeInfo result = instance.getAffiliationType(code); |
91 |
1
|
assertEquals(code, result.getCode()); |
92 |
|
|
93 |
|
} |
94 |
|
|
95 |
|
|
96 |
|
|
97 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
1
PASS
|
|
98 |
1
|
@Test... |
99 |
|
public void testGetCitizenshipStatus() { |
100 |
1
|
|
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
} |
107 |
|
|
108 |
|
|
109 |
|
|
110 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
111 |
1
|
@Test... |
112 |
|
public void testGetDefaultNamesForEntityIds() { |
113 |
1
|
|
114 |
1
|
List<String> entityIds = Arrays.asList(PersonEnum.STAFF1.getEntityId(), PersonEnum.STUDENT10.getEntityId()); |
115 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
116 |
1
|
Map result = instance.getDefaultNamesForEntityIds(entityIds); |
117 |
1
|
assertEquals(2, result.size()); |
118 |
|
} |
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
123 |
1
|
@Test... |
124 |
|
public void testGetDefaultNamesForPrincipalIds() { |
125 |
1
|
|
126 |
1
|
List<String> principalIds = Arrays.asList(PersonEnum.STAFF1.getPrincipalId(), PersonEnum.STUDENT10.getPrincipalId()); |
127 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
128 |
1
|
Map result = instance.getDefaultNamesForPrincipalIds(principalIds); |
129 |
1
|
assertEquals(2, result.size()); |
130 |
|
|
131 |
|
} |
132 |
|
|
133 |
|
|
134 |
|
|
135 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
136 |
1
|
@Test... |
137 |
|
public void testGetEmailType() { |
138 |
1
|
|
139 |
1
|
String code = EmailTypeEnum.HOME.getCode(); |
140 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
141 |
1
|
EmailTypeInfo result = instance.getEmailType(code); |
142 |
1
|
assertEquals(code, result.getCode()); |
143 |
|
} |
144 |
|
|
145 |
|
|
146 |
|
|
147 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
148 |
1
|
@Test... |
149 |
|
public void testGetEmploymentStatus() { |
150 |
1
|
System.out.println("getEmploymentStatus"); |
151 |
1
|
String code = EmployeeStatusEnum.ACTIVE.getCode(); |
152 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
153 |
1
|
EmploymentStatusInfo result = instance.getEmploymentStatus(code); |
154 |
1
|
assertEquals(code, result.getCode()); |
155 |
|
} |
156 |
|
|
157 |
|
|
158 |
|
|
159 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
160 |
1
|
@Test... |
161 |
|
public void testGetEmploymentType() { |
162 |
1
|
System.out.println("getEmploymentType"); |
163 |
1
|
String code = EmployeeTypeEnum.PROFESSIONAL.getCode(); |
164 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
165 |
1
|
EmploymentTypeInfo result = instance.getEmploymentType(code); |
166 |
1
|
assertEquals(code, result.getCode()); |
167 |
|
} |
168 |
|
|
169 |
|
|
170 |
|
|
171 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
172 |
1
|
@Test... |
173 |
|
public void testGetEntityDefaultInfo() { |
174 |
1
|
System.out.println("getEntityDefaultInfo"); |
175 |
1
|
String entityId = PersonEnum.STAFF1.getEntityId(); |
176 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
177 |
1
|
KimEntityDefaultInfo result = instance.getEntityDefaultInfo(entityId); |
178 |
1
|
assertEquals(entityId, result.getEntityId()); |
179 |
|
} |
180 |
|
|
181 |
|
|
182 |
|
|
183 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
184 |
1
|
@Test... |
185 |
|
public void testGetEntityDefaultInfoByPrincipalId() { |
186 |
1
|
System.out.println("getEntityDefaultInfoByPrincipalId"); |
187 |
1
|
String principalId = PersonEnum.STUDENT10.getPrincipalId(); |
188 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
189 |
1
|
KimEntityDefaultInfo result = instance.getEntityDefaultInfoByPrincipalId(principalId); |
190 |
1
|
assertEquals(principalId, result.getPrincipals().get(0).getPrincipalId()); |
191 |
|
} |
192 |
|
|
193 |
|
|
194 |
|
|
195 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
196 |
1
|
@Test... |
197 |
|
public void testGetEntityDefaultInfoByPrincipalName() { |
198 |
1
|
System.out.println("getEntityDefaultInfoByPrincipalName"); |
199 |
1
|
String principalName = PersonEnum.STUDENT10.getPrincipalName(); |
200 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
201 |
1
|
KimEntityDefaultInfo result = instance.getEntityDefaultInfoByPrincipalName(principalName); |
202 |
1
|
assertEquals(principalName, result.getPrincipals().get(0).getPrincipalName()); |
203 |
|
} |
204 |
|
|
205 |
|
|
206 |
|
|
207 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
208 |
1
|
@Test... |
209 |
|
public void testGetEntityInfo() { |
210 |
1
|
System.out.println("getEntityInfo"); |
211 |
1
|
String entityId = PersonEnum.FACULTY12.getEntityId(); |
212 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
213 |
1
|
KimEntityInfo result = instance.getEntityInfo(entityId); |
214 |
1
|
assertEquals(entityId, result.getEntityId()); |
215 |
|
} |
216 |
|
|
217 |
|
|
218 |
|
|
219 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
220 |
1
|
@Test... |
221 |
|
public void testGetEntityInfoByPrincipalId() { |
222 |
1
|
System.out.println("getEntityInfoByPrincipalId"); |
223 |
1
|
String principalId = PersonEnum.FACULTY12.getPrincipalId(); |
224 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
225 |
1
|
KimEntityInfo result = instance.getEntityInfoByPrincipalId(principalId); |
226 |
1
|
assertEquals(principalId, result.getPrincipals().get(0).getPrincipalId()); |
227 |
|
} |
228 |
|
|
229 |
|
|
230 |
|
|
231 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
232 |
1
|
@Test... |
233 |
|
public void testGetEntityInfoByPrincipalName() { |
234 |
1
|
System.out.println("getEntityInfoByPrincipalName"); |
235 |
1
|
String principalName = PersonEnum.FACULTY12.getPrincipalName(); |
236 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
237 |
1
|
KimEntityInfo result = instance.getEntityInfoByPrincipalName(principalName); |
238 |
1
|
assertEquals(principalName, result.getPrincipals().get(0).getPrincipalName()); |
239 |
|
} |
240 |
|
|
241 |
|
|
242 |
|
|
243 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
244 |
1
|
@Test... |
245 |
|
public void testGetEntityNameType() { |
246 |
1
|
System.out.println("getEntityNameType"); |
247 |
1
|
String code = EntityNameTypeEnum.PRIMARY.getCode(); |
248 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
249 |
1
|
EntityNameTypeInfo result = instance.getEntityNameType(code); |
250 |
1
|
assertEquals(code, result.getCode()); |
251 |
|
} |
252 |
|
|
253 |
|
|
254 |
|
|
255 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
256 |
1
|
@Test... |
257 |
|
public void testGetEntityPrivacyPreferences() { |
258 |
1
|
System.out.println("getEntityPrivacyPreferences"); |
259 |
1
|
String entityId = PersonEnum.AFFILIATE4.getEntityId(); |
260 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
261 |
1
|
KimEntityPrivacyPreferencesInfo result = instance.getEntityPrivacyPreferences(entityId); |
262 |
1
|
assertEquals(false, result.isSuppressAddress()); |
263 |
|
} |
264 |
|
|
265 |
|
|
266 |
|
|
267 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
268 |
1
|
@Test... |
269 |
|
public void testGetEntityType() { |
270 |
1
|
System.out.println("getEntityType"); |
271 |
1
|
String code = EntityTypeEnum.PERSON.getCode(); |
272 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
273 |
1
|
EntityTypeInfo result = instance.getEntityType(code); |
274 |
1
|
assertEquals(code, result.getCode()); |
275 |
|
} |
276 |
|
|
277 |
|
|
278 |
|
|
279 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
280 |
1
|
@Test... |
281 |
|
public void testGetExternalIdentifierType() { |
282 |
1
|
System.out.println("getExternalIdentifierType"); |
283 |
1
|
String code = ExternalIdentifierTypeEnum.TAX.getCode(); |
284 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
285 |
1
|
ExternalIdentifierTypeInfo result = instance.getExternalIdentifierType(code); |
286 |
1
|
assertEquals(code, result.getCode()); |
287 |
|
} |
288 |
|
|
289 |
|
|
290 |
|
|
291 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
292 |
1
|
@Test... |
293 |
|
public void testGetPhoneType() { |
294 |
1
|
System.out.println("getPhoneType"); |
295 |
1
|
String code = PhoneTypeEnum.MOBILE.getCode(); |
296 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
297 |
1
|
PhoneTypeInfo result = instance.getPhoneType(code); |
298 |
1
|
assertEquals(code, result.getCode()); |
299 |
|
} |
300 |
|
|
301 |
|
|
302 |
|
|
303 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
304 |
1
|
@Test... |
305 |
|
public void testGetPrincipal() { |
306 |
1
|
System.out.println("getPrincipal"); |
307 |
1
|
String principalId = PersonEnum.STAFF2.getPrincipalId(); |
308 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
309 |
1
|
KimPrincipalInfo result = instance.getPrincipal(principalId); |
310 |
1
|
assertEquals(principalId, result.getPrincipalId()); |
311 |
|
|
312 |
|
} |
313 |
|
|
314 |
|
|
315 |
|
|
316 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
1
PASS
|
|
317 |
1
|
@Test... |
318 |
|
public void testGetPrincipalByPrincipalName() { |
319 |
1
|
System.out.println("getPrincipalByPrincipalName"); |
320 |
1
|
String principalName = PersonEnum.FACULTY3.getPrincipalName(); |
321 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
322 |
1
|
KimPrincipalInfo result = instance.getPrincipalByPrincipalName(principalName); |
323 |
1
|
assertEquals(principalName, result.getPrincipalName()); |
324 |
|
} |
325 |
|
|
326 |
|
|
327 |
|
|
328 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1
PASS
|
|
329 |
1
|
@Test... |
330 |
|
public void testGetPrincipalByPrincipalNameAndPassword() { |
331 |
1
|
System.out.println("getPrincipalByPrincipalNameAndPassword"); |
332 |
1
|
String principalName = PersonEnum.FACULTY3.getPrincipalName(); |
333 |
1
|
String password = PersonEnum.FACULTY3.getPassword(); |
334 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
335 |
1
|
KimPrincipalInfo result = instance.getPrincipalByPrincipalNameAndPassword(principalName, password); |
336 |
1
|
assertEquals(principalName, result.getPrincipalName()); |
337 |
1
|
assertEquals(password, result.getPassword()); |
338 |
1
|
assertNull(instance.getPrincipalByPrincipalNameAndPassword(principalName, password + "XXXXX")); |
339 |
|
} |
340 |
|
|
341 |
|
|
342 |
|
|
343 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (47) |
Complexity: 1 |
Complexity Density: 0.02 |
1
PASS
|
|
344 |
1
|
@Test... |
345 |
|
public void testLookupEntityDefaultInfo() { |
346 |
1
|
System.out.println("lookupEntityDefaultInfo"); |
347 |
1
|
Map<String, String> searchCriteria = null; |
348 |
1
|
boolean unbounded = true; |
349 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
350 |
|
|
351 |
|
|
352 |
1
|
searchCriteria = new HashMap<String, String>(); |
353 |
1
|
unbounded = true; |
354 |
1
|
List<KimEntityDefaultInfo> results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
355 |
1
|
assertEquals(212, results.size()); |
356 |
|
|
357 |
|
|
358 |
1
|
searchCriteria = new HashMap<String, String>(); |
359 |
1
|
unbounded = false; |
360 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
361 |
1
|
assertEquals(100, results.size()); |
362 |
|
|
363 |
|
|
364 |
1
|
searchCriteria = new HashMap<String, String>(); |
365 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_AFFILIATION_TYPE_CODE, AffiliationTypeEnum.STUDENT.getCode()); |
366 |
1
|
unbounded = true; |
367 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
368 |
1
|
assertEquals(80, results.size()); |
369 |
|
|
370 |
|
|
371 |
1
|
searchCriteria = new HashMap<String, String>(); |
372 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_AFFILIATION_TYPE_CODE, AffiliationTypeEnum.FACULTY.getCode()); |
373 |
1
|
unbounded = true; |
374 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
375 |
1
|
assertEquals(60, results.size()); |
376 |
|
|
377 |
|
|
378 |
1
|
searchCriteria = new HashMap<String, String>(); |
379 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_AFFILIATION_TYPE_CODE, AffiliationTypeEnum.STAFF.getCode()); |
380 |
1
|
unbounded = true; |
381 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
382 |
1
|
assertEquals(62, results.size()); |
383 |
|
|
384 |
|
|
385 |
1
|
searchCriteria = new HashMap<String, String>(); |
386 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_AFFILIATION_TYPE_CODE, AffiliationTypeEnum.AFFILIATE.getCode()); |
387 |
1
|
unbounded = true; |
388 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
389 |
1
|
assertEquals(10, results.size()); |
390 |
|
|
391 |
|
|
392 |
1
|
searchCriteria = new HashMap<String, String>(); |
393 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_AFFILIATION_TYPE_CODE, AffiliationTypeEnum.STUDENT.getCode()); |
394 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_LAST_NAME, "Manning"); |
395 |
1
|
unbounded = true; |
396 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
397 |
1
|
assertEquals(1, results.size()); |
398 |
|
|
399 |
|
|
400 |
1
|
searchCriteria = new HashMap<String, String>(); |
401 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_AFFILIATION_TYPE_CODE, AffiliationTypeEnum.STUDENT.getCode()); |
402 |
1
|
searchCriteria.put(IdentityServiceConstants.KIM_PERSON_LAST_NAME, "Ma*"); |
403 |
1
|
unbounded = true; |
404 |
1
|
results = instance.lookupEntityDefaultInfo(searchCriteria, unbounded); |
405 |
1
|
for (KimEntityDefaultInfo info : results) { |
406 |
3
|
assertEquals(AffiliationTypeEnum.STUDENT.getCode(), info.getDefaultAffiliation().getAffiliationTypeCode()); |
407 |
3
|
assertEquals("Ma", info.getDefaultName().getLastName().substring(0, 2)); |
408 |
|
} |
409 |
1
|
assertEquals(3, results.size()); |
410 |
|
} |
411 |
|
|
412 |
|
|
413 |
|
|
414 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0.12 |
1
PASS
|
|
415 |
1
|
@Test... |
416 |
|
public void testLookupEntityInfo() { |
417 |
1
|
System.out.println("lookupEntityInfo"); |
418 |
1
|
Map<String, String> searchCriteria = null; |
419 |
1
|
boolean unbounded = true; |
420 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
421 |
|
|
422 |
|
|
423 |
1
|
searchCriteria = new HashMap<String, String>(); |
424 |
1
|
unbounded = true; |
425 |
1
|
List<KimEntityInfo> results = instance.lookupEntityInfo(searchCriteria, unbounded); |
426 |
1
|
assertEquals(212, results.size()); |
427 |
|
} |
428 |
|
|
429 |
|
|
430 |
|
|
431 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 1 |
Complexity Density: 0.17 |
1
PASS
|
|
432 |
1
|
@Test... |
433 |
|
public void testGetMatchingEntityCount() { |
434 |
1
|
System.out.println("getMatchingEntityCount"); |
435 |
1
|
Map<String, String> searchCriteria = null; |
436 |
1
|
IdentityServiceMockImpl instance = new IdentityServiceMockImpl(); |
437 |
|
|
438 |
|
|
439 |
1
|
searchCriteria = new HashMap<String, String>(); |
440 |
1
|
int results = instance.getMatchingEntityCount(searchCriteria); |
441 |
1
|
assertEquals(212, results); |
442 |
|
} |
443 |
|
} |