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 javax.faces.component.EditableValueHolder;
24
25 import org.apache.myfaces.trinidad.component.UIXComponent;
26
27
28
29
30
31 abstract public class UIXEditableValueTestCase extends UIComponentTestCase
32 {
33
34
35
36
37
38 public UIXEditableValueTestCase(
39 String testName)
40 {
41 super(testName);
42 }
43
44 @SuppressWarnings("cast")
45 public void testInterfaces()
46 {
47 UIXEditableValue component = createEditableValue();
48 assertTrue(component instanceof EditableValueHolder);
49 }
50
51
52
53
54 public void testInitialAttributeValues()
55 {
56 UIXEditableValue component = createEditableValue();
57 assertEquals(false, component.isTransient());
58 assertEquals(true, component.isValid());
59 assertEquals(true, component.isRendered());
60 assertEquals(null, component.getValue());
61 assertEquals(null, component.getLocalValue());
62 assertEquals(null, component.getSubmittedValue());
63 assertEquals(false, component.isLocalValueSet());
64 }
65
66
67
68
69
70
71 public void testTypeKeyInstances()
72 {
73 UIXEditableValue component = createEditableValue();
74 assertSame(component.getFacesBean().getType().findKey("value"),
75 UIXEditableValue.VALUE_KEY);
76 }
77
78
79
80
81
82
83 public void testAttributeTransparency()
84 {
85
86
87 }
88
89
90
91
92 public void testApplyRequestValues()
93 {
94 doTestApplyRequestValues(createEditableValue());
95
96 UIXEditableValue component = createEditableValue();
97 component.setRendered(false);
98 doTestApplyRequestValues(component);
99 }
100
101
102
103
104 public void testProcessValidations()
105 {
106 doTestProcessValidations(createEditableValue());
107 }
108
109
110
111
112 public void testUpdateModelValues()
113 {
114 doTestUpdateModelValues(createEditableValue());
115 }
116
117
118
119
120 public void testInvokeApplication()
121 {
122 UIXEditableValue component = createEditableValue();
123
124 doTestInvokeApplication(component, null);
125 }
126
127
128
129
130
131
132 public void testRenderResponse() throws IOException
133 {
134 doTestRenderResponse(createEditableValue());
135 }
136
137 protected final UIXComponent createComponent()
138 {
139 return createEditableValue();
140 }
141
142 abstract protected UIXEditableValue createEditableValue();
143 }