Clover Coverage Report - KS LUM 1.1-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Mar 3 2011 05:27:45 EST
11   43   3   3.67
0   34   0.27   3
3     1  
1    
 
  PersonContextImplTest       Line # 15 11 0% 3 0 100% 1.0
 
  (1)
 
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   
 
15    public class PersonContextImplTest {
16   
17    private PersonContextImpl personContext = new PersonContextImpl();
18   
19    private ReqComponentInfo reqComponent1;
20   
 
21  1 toggle 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   
 
31  1 toggle @Before
32    public void beforeMethod() {
33  1 setupReqComponent1();
34    }
35   
 
36  1 toggle @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    }