|
@@ -1,31 +1,25 @@ |
1 |
1 |
|
// This Source Code is in the Public Domain per: http://unlicense.org |
2 |
2 |
|
package org.litesoft.GWT.forms.server; |
3 |
3 |
|
|
4 |
|
- |
import junit.framework.*; |
5 |
|
- |
|
6 |
4 |
|
import org.litesoft.ui_1_5.*; |
7 |
5 |
|
|
8 |
|
- |
public class InterceptingProxyExternalizationTest extends TestCase implements ExternalizationSupport |
9 |
|
- |
{ |
10 |
|
- |
public static TestSuite suite() |
11 |
|
- |
{ |
|
6 |
+ |
import junit.framework.*; |
|
7 |
+ |
|
|
8 |
+ |
public class InterceptingProxyExternalizationTest extends TestCase implements ExternalizationSupport { |
|
9 |
+ |
public static TestSuite suite() { |
12 |
10 |
|
return new TestSuite( InterceptingProxyExternalizationTest.class ); |
13 |
11 |
|
} |
14 |
12 |
|
|
15 |
|
- |
public InterceptingProxyExternalizationTest( String name ) |
16 |
|
- |
{ |
|
13 |
+ |
public InterceptingProxyExternalizationTest( String name ) { |
17 |
14 |
|
super( name ); |
18 |
15 |
|
} |
19 |
16 |
|
|
20 |
|
- |
public static void main( String[] args ) |
21 |
|
- |
{ |
|
17 |
+ |
public static void main( String[] args ) { |
22 |
18 |
|
junit.textui.TestRunner.run( suite() ); |
23 |
19 |
|
} |
24 |
20 |
|
|
25 |
|
- |
private static ExternalizationInterface BASE = new UnresolvedExternalization() |
26 |
|
- |
{ |
27 |
|
- |
protected String LLresolveTooltip( String pKey ) |
28 |
|
- |
{ |
|
21 |
+ |
private static ExternalizationInterface BASE = new UnresolvedExternalization() { |
|
22 |
+ |
protected String LLresolveTooltip( String pKey ) { |
29 |
23 |
|
return LLresolve( pKey + TOOLTIP ); |
30 |
24 |
|
} |
31 |
25 |
|
}; |
|
@@ -33,8 +27,7 @@ |
33 |
27 |
|
private static InterceptingProxyExternalization PROXY1 = new InterceptingProxyExternalization( BASE ); |
34 |
28 |
|
private static InterceptingProxyExternalization PROXY2 = new InterceptingProxyExternalization( PROXY1 ); |
35 |
29 |
|
|
36 |
|
- |
static |
37 |
|
- |
{ |
|
30 |
+ |
static { |
38 |
31 |
|
PROXY1.add( "p1common", "p1C", "p1CTT" ); |
39 |
32 |
|
PROXY1.addLabel( "p1label", "p1L" ); |
40 |
33 |
|
PROXY1.addAction( "p1action", "p1A", "p1ATT" ); |
|
@@ -81,8 +74,7 @@ |
81 |
74 |
|
} |
82 |
75 |
|
|
83 |
76 |
|
public void testLabel() |
84 |
|
- |
throws Exception |
85 |
|
- |
{ |
|
77 |
+ |
throws Exception { |
86 |
78 |
|
assertEquals( "[yo]", BASE.resolveLabel( "yo" ) ); |
87 |
79 |
|
assertEquals( "[c1common]", BASE.resolveLabel( "c1common" ) ); |
88 |
80 |
|
assertEquals( "[c1input]", BASE.resolveLabel( "c1input" ) ); |
|
@@ -154,8 +146,7 @@ |
154 |
146 |
|
} |
155 |
147 |
|
|
156 |
148 |
|
public void testAction() |
157 |
|
- |
throws Exception |
158 |
|
- |
{ |
|
149 |
+ |
throws Exception { |
159 |
150 |
|
assertEquals( "[yo]", BASE.resolveAction( "yo" ) ); |
160 |
151 |
|
assertEquals( "[c1common]", BASE.resolveAction( "c1common" ) ); |
161 |
152 |
|
assertEquals( "[c1action]", BASE.resolveAction( "c1action" ) ); |
|
@@ -227,8 +218,7 @@ |
227 |
218 |
|
} |
228 |
219 |
|
|
229 |
220 |
|
public void testActionTooltip() |
230 |
|
- |
throws Exception |
231 |
|
- |
{ |
|
221 |
+ |
throws Exception { |
232 |
222 |
|
assertEquals( "[yoTooltip]", BASE.resolveActionTooltip( "yo" ) ); |
233 |
223 |
|
assertEquals( "[c1commonTooltip]", BASE.resolveActionTooltip( "c1common" ) ); |
234 |
224 |
|
assertEquals( "[c1actionTooltip]", BASE.resolveActionTooltip( "c1action" ) ); |
|
@@ -261,8 +251,7 @@ |
261 |
251 |
|
} |
262 |
252 |
|
|
263 |
253 |
|
public void testInputTooltip() |
264 |
|
- |
throws Exception |
265 |
|
- |
{ |
|
254 |
+ |
throws Exception { |
266 |
255 |
|
assertEquals( "[yoTooltip]", BASE.resolveInputTooltip( "yo" ) ); |
267 |
256 |
|
assertEquals( "[c1commonTooltip]", BASE.resolveInputTooltip( "c1common" ) ); |
268 |
257 |
|
assertEquals( "[c1inputTooltip]", BASE.resolveInputTooltip( "c1input" ) ); |
|
@@ -295,8 +284,7 @@ |
295 |
284 |
|
} |
296 |
285 |
|
|
297 |
286 |
|
public void testError() |
298 |
|
- |
throws Exception |
299 |
|
- |
{ |
|
287 |
+ |
throws Exception { |
300 |
288 |
|
assertEquals( "[yo]", BASE.resolveError( "yo" ) ); |
301 |
289 |
|
assertEquals( "[c1common]", BASE.resolveError( "c1common" ) ); |
302 |
290 |
|
assertEquals( "[c1error]", BASE.resolveError( "c1error" ) ); |