1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.datadictionary;
17
18 import org.junit.Ignore;
19 import org.junit.Test;
20 import org.kuali.rice.krad.bo.AdHocRoutePerson;
21 import org.kuali.rice.krad.service.KRADServiceLocatorWeb;
22 import org.kuali.test.KRADTestCase;
23
24 import static org.junit.Assert.assertEquals;
25
26
27
28
29
30
31
32 public class DataDictionaryLazyLoadingTest extends KRADTestCase {
33
34 @Test
35 public void testBusinessObjectDataDictionaryEntriesAreSame() {
36 BusinessObjectEntry entry1 = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(AdHocRoutePerson.class.getName());
37 BusinessObjectEntry entry2 = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(AdHocRoutePerson.class.getName());
38 BusinessObjectEntry entry3 = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getBusinessObjectEntry(AdHocRoutePerson.class.getName());
39
40 assertEquals(entry1, entry2);
41 assertEquals(entry1, entry3);
42 assertEquals(entry2, entry3);
43 }
44
45 @Test
46 public void testDocumentDataDictionaryEntriesAreSame() {
47 DocumentEntry entry1 = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry("CampusMaintenanceDocument");
48 DocumentEntry entry2 = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry("CampusMaintenanceDocument");
49 DocumentEntry entry3 = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry("CampusMaintenanceDocument");
50
51 assertEquals(entry1, entry2);
52 assertEquals(entry1, entry3);
53 assertEquals(entry2, entry3);
54 }
55
56 }