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 junit.framework.Test;
24 import junit.framework.TestSuite;
25
26 import org.apache.myfaces.trinidad.component.UIComponentTestCase;
27
28
29
30
31
32
33
34 public class CorePanelChoiceTest extends UIComponentTestCase
35 {
36
37
38
39
40
41 public CorePanelChoiceTest(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(CorePanelChoiceTest.class);
61 }
62
63
64
65
66 public void testInitialAttributeValues()
67 {
68 CorePanelChoice component = new CorePanelChoice();
69 assertEquals(true, component.isRendered());
70 assertNull(component.getLabel());
71 assertEquals("start",component.getPosition());
72 assertEquals("center", component.getAlignment());
73 }
74
75
76
77
78 public void testgetAttributeValues()
79 {
80 CorePanelChoice component = new CorePanelChoice();
81 assertEquals("org.apache.myfaces.trinidad.ShowOne",component.getFamily());
82 }
83
84
85
86
87
88
89 public void testAttributeTransparency()
90 {
91 CorePanelChoice component= new CorePanelChoice();
92 doTestAttributeTransparency(component, "rendered",
93 Boolean.TRUE, Boolean.FALSE);
94 doTestAttributeTransparency(component, "label", "foo", "bar");
95 doTestAttributeTransparency(component, "position", "start", "top");
96 doTestAttributeTransparency(component, "alignment", "center", "bottom");
97 }
98
99
100
101
102 public void testApplyRequestValues()
103 {
104 CorePanelChoice component= new CorePanelChoice();
105 doTestApplyRequestValues(component);
106 component= new CorePanelChoice();
107 component.setRendered(false);
108 doTestApplyRequestValues(component);
109 }
110
111
112
113
114 public void testProcessValidations()
115 {
116 CorePanelChoice component= new CorePanelChoice();
117 doTestProcessValidations(component);
118 }
119
120
121
122
123 public void testUpdateModelValues()
124 {
125 CorePanelChoice component= new CorePanelChoice();
126 doTestUpdateModelValues(component);
127 }
128
129
130
131
132 public void testInvokeApplication()
133 {
134 CorePanelChoice component= new CorePanelChoice();
135 doTestInvokeApplication(component, null);
136 }
137
138
139
140
141
142
143 public void testRenderResponse() throws IOException
144 {
145 CorePanelChoice component= new CorePanelChoice();
146 doTestRenderResponse(component);
147 }
148
149 }
150