1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.util;
17
18 import static org.junit.Assert.assertEquals;
19
20 import org.apache.log4j.Logger;
21 import org.junit.AfterClass;
22 import org.junit.Assume;
23 import org.junit.BeforeClass;
24 import org.junit.Ignore;
25 import org.junit.Test;
26 import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader;
27 import org.kuali.rice.krad.uif.element.Message;
28 import org.kuali.rice.krad.uif.view.InquiryView;
29
30
31
32
33
34
35 public class ComponentFactoryTest extends ProcessLoggingUnitTest {
36
37 @BeforeClass
38 public static void setUpClass() throws Throwable {
39 UifUnitTestUtils.establishMockConfig("KRAD-ComponentFactoryTest");
40 }
41
42 @AfterClass
43 public static void tearDownClass() throws Throwable {
44 GlobalResourceLoader.stop();
45 }
46
47 @Test
48 public void testSanity() throws Throwable {
49 try {
50 Message message = ComponentFactory.getMessage();
51 assertEquals("uif-message", message.getCssClasses().get(0));
52 } catch (NullPointerException e) {
53 Assume.assumeNoException("Missing required testing resources, skipping", e);
54 }
55 }
56
57 @Test
58 public void testInquiry() throws Throwable {
59 try {
60 InquiryView inquiryView = ComponentFactory.getInquiryView();
61 assertEquals("uif-formView", inquiryView.getCssClasses().get(0));
62 } catch (NullPointerException e) {
63 Assume.assumeNoException("Missing required testing resources, skipping", e);
64 }
65 }
66
67 }