1 |
|
package org.kuali.student.lum.statement.config.context; |
2 |
|
|
3 |
|
import java.util.ArrayList; |
4 |
|
import java.util.List; |
5 |
|
import java.util.Map; |
6 |
|
|
7 |
|
import org.junit.Assert; |
8 |
|
import org.junit.Before; |
9 |
|
import org.junit.Test; |
10 |
|
import org.kuali.student.core.exceptions.OperationFailedException; |
11 |
|
import org.kuali.student.core.statement.dto.ReqCompFieldInfo; |
12 |
|
import org.kuali.student.core.statement.dto.ReqComponentInfo; |
13 |
|
import org.kuali.student.lum.statement.typekey.ReqComponentFieldTypes; |
14 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 3 |
Complexity Density: 0.27 |
|
15 |
|
public class PersonContextImplTest { |
16 |
|
|
17 |
|
private PersonContextImpl personContext = new PersonContextImpl(); |
18 |
|
|
19 |
|
private ReqComponentInfo reqComponent1; |
20 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (7) |
Complexity: 1 |
Complexity Density: 0.14 |
|
21 |
1
|
private void setupReqComponent1() {... |
22 |
1
|
reqComponent1 = new ReqComponentInfo(); |
23 |
1
|
List<ReqCompFieldInfo> reqCompFieldList = new ArrayList<ReqCompFieldInfo>(); |
24 |
1
|
ReqCompFieldInfo reqCompField1 = new ReqCompFieldInfo(); |
25 |
1
|
reqCompField1.setType(ReqComponentFieldTypes.PERSON_KEY.getId()); |
26 |
1
|
reqCompField1.setValue("1234567890"); |
27 |
1
|
reqCompFieldList.add(reqCompField1); |
28 |
1
|
reqComponent1.setReqCompFields(reqCompFieldList); |
29 |
|
} |
30 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
31 |
1
|
@Before... |
32 |
|
public void beforeMethod() { |
33 |
1
|
setupReqComponent1(); |
34 |
|
} |
35 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0.33 |
1
PASS
|
|
36 |
1
|
@Test... |
37 |
|
public void testCreateContextMap() throws OperationFailedException { |
38 |
1
|
Map<String, Object> contextMap = personContext.createContextMap(reqComponent1); |
39 |
|
|
40 |
1
|
Assert.assertNotNull(contextMap); |
41 |
1
|
Assert.assertEquals("1234567890", contextMap.get(PersonContextImpl.PERSON_TOKEN)); |
42 |
|
} |
43 |
|
} |