Clover Coverage Report - KS LUM 1.2-M4-SNAPSHOT (Aggregated)
Coverage timestamp: Wed Jul 20 2011 13:25:47 EDT
23   104   6   3.83
0   66   0.26   6
6     1  
1    
 
  OldMetadataLoaderTest       Line # 33 23 0% 6 0 100% 1.0
 
  (1)
 
1    /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10    * software distributed under the License is distributed on an "AS IS"
11    * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12    * or implied. See the License for the specific language governing
13    * permissions and limitations under the License.
14    */
15    package org.kuali.student.lum.lu.assembly;
16   
17    import static org.junit.Assert.assertTrue;
18   
19    import java.util.Map;
20   
21    import org.junit.After;
22    import org.junit.AfterClass;
23    import org.junit.Before;
24    import org.junit.BeforeClass;
25    import org.junit.Test;
26    import org.kuali.student.common.assembly.data.Metadata;
27    import org.kuali.student.common.assembly.dictionary.old.MetadataServiceImpl;
28   
29    /**
30    *
31    * @author nwright
32    */
 
33    public class OldMetadataLoaderTest
34    {
35   
 
36  1 toggle public OldMetadataLoaderTest ()
37    {
38    }
39   
 
40  1 toggle @BeforeClass
41    public static void setUpClass ()
42    throws Exception
43    {
44    }
45   
 
46  1 toggle @AfterClass
47    public static void tearDownClass ()
48    throws Exception
49    {
50    }
51   
 
52  1 toggle @Before
53    public void setUp ()
54    {
55    }
56   
 
57  1 toggle @After
58    public void tearDown ()
59    {
60    }
61   
62    public static final String ORCH_DICTIONARY_CONFIG_LOCATION =
63    "classpath:lum-orchestration-dictionary.xml";
64   
 
65  1 toggle @Test
66    public void testOrchestrationDictionaryMetadata ()
67    {
68  1 MetadataServiceImpl metadataService =
69    new MetadataServiceImpl (ORCH_DICTIONARY_CONFIG_LOCATION);
70   
71  1 Metadata metadata =
72    metadataService.getMetadata ("CreditCourseProposal", "default", "default");
73   
74  1 Map<String, Metadata> properties = metadata.getProperties ();
75  1 assertTrue (properties.containsKey ("course"));
76  1 metadata = properties.get ("course");
77   
78  1 properties = metadata.getProperties ();
79  1 assertTrue (properties.containsKey ("formats"));
80  1 metadata = properties.get ("formats");
81   
82  1 properties = metadata.getProperties ();
83  1 assertTrue (properties.containsKey ("*"));
84  1 metadata = properties.get ("*");
85   
86  1 properties = metadata.getProperties ();
87  1 assertTrue (properties.containsKey ("activities"));
88   
89  1 metadata = metadataService.getMetadata ("joints", "default", "default");
90  1 properties = metadata.getProperties ();
91   
92  1 metadata = properties.get ("_runtimeData");
93  1 properties = metadata.getProperties ();
94  1 assertTrue (properties.containsKey ("created"));
95   
96  1 metadata =
97    metadataService.getMetadata ("BrowseCourseCatalog", "", "");
98  1 properties = metadata.getProperties();
99  1 assertTrue (properties.containsKey( ("bySubjectArea")));
100  1 properties = metadata.getProperties();
101  1 assertTrue (properties.containsKey( ("bySchoolOrCollege")));
102    }
103   
104    }