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.output;
20
21 import java.io.IOException;
22
23 import org.apache.myfaces.trinidad.component.UIComponentTestCase;
24 import org.apache.myfaces.trinidad.component.UIXObject;
25
26 /**
27 * Unit tests for UIXObject components
28 *
29 */
30 public abstract class UIXObjectTestCase extends UIComponentTestCase
31 {
32 /**
33 * Creates a new UIXObjectTest
34 *
35 * @param testName the unit test name
36 */
37 protected UIXObjectTestCase(
38 String testName)
39 {
40 super(testName);
41 }
42
43 protected abstract UIXObject createTestComponent();
44
45 /**
46 * Tests the apply-request-values lifecycle phase.
47 */
48 public void testApplyRequestValues()
49 {
50
51
52
53 UIXObject component = createTestComponent();
54 doTestApplyRequestValues(component);
55
56
57 component = createTestComponent();
58 component.setRendered(false);
59 doTestApplyRequestValues(component);
60 }
61
62 /**
63 * Tests the process-validations lifecycle phase.
64 */
65 public void testProcessValidations()
66 {
67 UIXObject component = createTestComponent();
68 doTestProcessValidations(component);
69 }
70
71 /**
72 * Tests the update-model-values lifecycle phase.
73 */
74 public void testUpdateModelValues()
75 {
76 UIXObject component = createTestComponent();
77 doTestUpdateModelValues(component);
78 }
79
80 /**
81 * Tests the invoke-application lifecycle phase.
82 */
83 public void testInvokeApplication()
84 {
85 UIXObject component = createTestComponent();
86 doTestInvokeApplication(component, null);
87 }
88
89 /**
90 * Tests the render-response lifecycle phase.
91 *
92 * @throws IOException when test fails
93 */
94 public void testRenderResponse() throws IOException
95 {
96 UIXObject component = createTestComponent();
97 doTestRenderResponse(component);
98 }
99 }