Clover Coverage Report - Kuali Student 1.3.0-SNAPSHOT (Aggregated)
Coverage timestamp: Thu Apr 28 2011 05:03:32 EDT
17   47   3   8.5
2   42   0.18   2
2     1.5  
1    
 
  TestClusetUiObjectDictionary       Line # 11 17 0% 3 21 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   
9    import static org.junit.Assert.fail;
10   
 
11    public class TestClusetUiObjectDictionary
12    {
13   
 
14  0 toggle @Test
15    public void testLoadCluSetInfoDictionary ()
16    {
17  0 Set<String> startingClasses = new LinkedHashSet ();
18  0 startingClasses.add ("cluset");
19  0 startingClasses.add ("courseSet");
20  0 startingClasses.add ("programSet");
21  0 startingClasses.add ("testSet");
22  0 String contextFile = "ks-cluset-ui-object-dictionary-context";
23  0 String outFile = "target/" + contextFile + ".txt";
24  0 DictionaryTesterHelper helper = new DictionaryTesterHelper (outFile,
25    startingClasses,
26    contextFile
27    + ".xml",
28    true);
29  0 List<String> errors = helper.doTest ();
30  0 if (errors.size () > 0)
31    {
32  0 fail ("failed dictionary validation:\n" + formatAsString (errors));
33    }
34    }
35   
 
36  0 toggle private String formatAsString (List<String> errors)
37    {
38  0 int i = 0;
39  0 StringBuilder builder = new StringBuilder ();
40  0 for (String error : errors)
41    {
42  0 i ++;
43  0 builder.append (i + ". " + error + "\n");
44    }
45  0 return builder.toString ();
46    }
47    }