1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.trinidad.component.core.layout;
20
21 import java.io.IOException;
22
23 import org.apache.myfaces.trinidad.component.UIComponentTestCase;
24 import org.apache.myfaces.trinidad.component.UIXPanel;
25
26 /**
27 * Unit tests for UIXPanel Components
28 *
29 */
30 public abstract class UIXPanelTestCase extends UIComponentTestCase
31 {
32 /**
33 * Creates a new UIXPanelTestCase.
34 *
35 * @param testName the unit test name
36 */
37 protected UIXPanelTestCase(
38 String testName)
39 {
40 super(testName);
41 }
42
43 protected abstract UIXPanel createTestComponent();
44
45 /**
46 * Tests the apply-request-values lifecycle phase.
47 */
48 public void testApplyRequestValues()
49 {
50 UIXPanel component = createTestComponent();
51 doTestApplyRequestValues(component);
52
53 component = createTestComponent();
54 component.setRendered(false);
55 doTestApplyRequestValues(component);
56 }
57
58 /**
59 * Tests the process-validations lifecycle phase.
60 */
61 public void testProcessValidations()
62 {
63 UIXPanel component = createTestComponent();
64 doTestProcessValidations(component);
65 }
66
67 /**
68 * Tests the update-model-values lifecycle phase.
69 */
70 public void testUpdateModelValues()
71 {
72 UIXPanel component = createTestComponent();
73 doTestUpdateModelValues(component);
74 }
75
76 /**
77 * Tests the invoke-application lifecycle phase.
78 */
79 public void testInvokeApplication()
80 {
81 UIXPanel component = createTestComponent();
82 doTestInvokeApplication(component, null);
83 }
84
85 /**
86 * Tests the render-response lifecycle phase.
87 *
88 * @throws IOException when test fails
89 */
90 public void testRenderResponse() throws IOException
91 {
92 UIXPanel component = createTestComponent();
93 doTestRenderResponse(component);
94 }
95
96 }