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;
20
21 import java.io.IOException;
22
23 import junit.framework.Test;
24 import junit.framework.TestSuite;
25 import junit.textui.TestRunner;
26
27 import org.apache.myfaces.trinidad.component.UIComponentTestCase;
28
29 /**
30 * Unit tests for UIXProcess
31 *
32 */
33 public class UIXProcessTest extends UIComponentTestCase
34 {
35 /**
36 * Creates a new UIXProcessTest.
37 *
38 * @param testName the unit test name
39 */
40 public UIXProcessTest(
41 String testName)
42 {
43 super(testName);
44 }
45
46 @Override
47 protected void setUp() throws Exception
48 {
49 super.setUp();
50 }
51
52 @Override
53 protected void tearDown() throws Exception
54 {
55 super.tearDown();
56 }
57
58 public static Test suite()
59 {
60 return new TestSuite(UIXProcessTest.class);
61 }
62
63 public static void main(String[] args)
64 {
65 TestRunner.run(UIXProcessTest.class);
66 }
67
68 /**
69 * Tests the initial values for the component attributes.
70 */
71 public void testInitialAttributeValues()
72 {
73 UIXProcess component = new UIXProcess();
74 assertEquals(true, component.isRendered());
75 }
76
77 /**
78 * Tests the transparency of the component attribute by comparing
79 * bean accessor and mutator methods with attribute map accessor
80 * and mutator methods.
81 */
82 public void testAttributeTransparency()
83 {
84 UIXProcess component = new UIXProcess();
85
86 doTestAttributeTransparency(component, "rendered",
87 Boolean.TRUE, Boolean.FALSE);
88
89 }
90
91
92
93
94 /**
95 * Tests the process-validations lifecycle phase.
96 */
97 public void testProcessValidations()
98 {
99 UIXProcess component = new UIXProcess();
100 doTestProcessValidations(component);
101 }
102
103 /**
104 * Tests the apply-request-values lifecycle phase.
105 */
106 public void testApplyRequestValues()
107 {
108 UIXProcess component = new UIXProcess();
109 doTestApplyRequestValues(component);
110
111 component = new UIXProcess();
112 component.setRendered(false);
113 doTestApplyRequestValues(component);
114 }
115
116 /**
117 * Tests the update-model-values lifecycle phase.
118 */
119 public void testUpdateModelValues()
120 {
121 UIXProcess component = new UIXProcess();
122 doTestUpdateModelValues(component);
123 }
124
125
126 /**
127 * Tests the render-response lifecycle phase.
128 *
129 * @throws IOException when test fails
130 */
131 public void testRenderResponse() throws IOException
132 {
133 UIXProcess component = new UIXProcess();
134 doTestRenderResponse(component);
135 }
136 }