Clover Coverage Report - Kuali Student 1.2-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Mar 3 2011 04:02:59 EST
18   55   3   9
2   48   0.17   2
2     1.5  
1    
 
  TestLrcDictionary       Line # 15 18 0% 3 9 59.1% 0.59090906
 
  (1)
 
1    package org.kuali.student.lum.course.service.impl;
2   
3    import java.util.LinkedHashSet;
4    import java.util.List;
5    import java.util.Set;
6    import org.junit.Test;
7    import org.kuali.student.common.dictionary.service.impl.DictionaryTesterHelper;
8    import org.kuali.student.lum.lrc.dto.CredentialInfo;
9    import org.kuali.student.lum.lrc.dto.CreditInfo;
10    import org.kuali.student.lum.lrc.dto.GradeInfo;
11    import org.kuali.student.lum.lrc.dto.ResultComponentInfo;
12    import org.kuali.student.lum.lrc.dto.ScaleInfo;
13    import static org.junit.Assert.*;
14   
 
15    public class TestLrcDictionary
16    {
17   
 
18  1 toggle @Test
19    public void testLoadLrcDictionary ()
20    {
21  1 Set<String> startingClasses = new LinkedHashSet ();
22  1 startingClasses.add (ResultComponentInfo.class.getName ());
23  1 startingClasses.add (CreditInfo.class.getName ());
24  1 startingClasses.add (CredentialInfo.class.getName ());
25  1 startingClasses.add (ScaleInfo.class.getName ());
26  1 startingClasses.add (GradeInfo.class.getName ());
27  1 String contextFile = "ks-lrc-dictionary-context";
28  1 String outFile = "target/" + contextFile + ".txt";
29  1 DictionaryTesterHelper helper = new DictionaryTesterHelper (outFile,
30    startingClasses,
31    contextFile
32    + ".xml",
33    false);
34  1 List<String> errors = helper.doTest ();
35  1 if (errors.size () > 0)
36    {
37  0 fail ("failed dictionary validation:\n" + formatAsString (errors));
38    }
39    }
40   
 
41  0 toggle private String formatAsString (List<String> errors)
42    {
43  0 int i = 0;
44  0 StringBuilder builder = new StringBuilder ();
45  0 for (String error : errors)
46    {
47  0 i ++;
48  0 builder.append (i + ". " + error + "\n");
49    }
50  0 return builder.toString ();
51    }
52   
53   
54   
55    }