| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 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 |
| 32 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (29) |
Complexity: 6 |
Complexity Density: 0.26 |
|
| 33 |
|
public class OldMetadataLoaderTest |
| 34 |
|
{ |
| 35 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 36 |
1
|
public OldMetadataLoaderTest ()... |
| 37 |
|
{ |
| 38 |
|
} |
| 39 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 40 |
1
|
@BeforeClass... |
| 41 |
|
public static void setUpClass () |
| 42 |
|
throws Exception |
| 43 |
|
{ |
| 44 |
|
} |
| 45 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 46 |
1
|
@AfterClass... |
| 47 |
|
public static void tearDownClass () |
| 48 |
|
throws Exception |
| 49 |
|
{ |
| 50 |
|
} |
| 51 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 52 |
1
|
@Before... |
| 53 |
|
public void setUp () |
| 54 |
|
{ |
| 55 |
|
} |
| 56 |
|
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
| 57 |
1
|
@After... |
| 58 |
|
public void tearDown () |
| 59 |
|
{ |
| 60 |
|
} |
| 61 |
|
|
| 62 |
|
public static final String ORCH_DICTIONARY_CONFIG_LOCATION = |
| 63 |
|
"classpath:lum-orchestration-dictionary.xml"; |
| 64 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (23) |
Complexity: 1 |
Complexity Density: 0.04 |
1
PASS
|
|
| 65 |
1
|
@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 |
|
} |