Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
18   55   3   9
2   48   0.17   2
2     1.5  
1    
 
  TestLrcDictionary       Line # 15 18 0% 3 22 0% 0.0
 
No Tests
 
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  0 toggle @Test
19    public void testLoadLrcDictionary ()
20    {
21  0 Set<String> startingClasses = new LinkedHashSet ();
22  0 startingClasses.add (ResultComponentInfo.class.getName ());
23  0 startingClasses.add (CreditInfo.class.getName ());
24  0 startingClasses.add (CredentialInfo.class.getName ());
25  0 startingClasses.add (ScaleInfo.class.getName ());
26  0 startingClasses.add (GradeInfo.class.getName ());
27  0 String contextFile = "ks-lrc-dictionary-context";
28  0 String outFile = "target/" + contextFile + ".txt";
29  0 DictionaryTesterHelper helper = new DictionaryTesterHelper (outFile,
30    startingClasses,
31    contextFile
32    + ".xml",
33    false);
34  0 List<String> errors = helper.doTest ();
35  0 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    }