File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
spring-beans/src/test/java/org/springframework/beans Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .springframework .beans ;
18
18
19
- import static org .junit .Assert . assertEquals ;
19
+ import org .junit .Test ;
20
20
21
- import javax .swing .JPanel ;
22
- import javax .swing .JTextField ;
21
+ import org .springframework .tests .sample .beans .TestBean ;
23
22
24
- import org .junit .Test ;
23
+ import static org .junit .Assert .* ;
25
24
26
25
/**
27
26
* Unit tests for {@link DirectFieldAccessor}
@@ -39,13 +38,13 @@ protected ConfigurablePropertyAccessor createAccessor(Object target) {
39
38
@ Test
40
39
public void withShadowedField () throws Exception {
41
40
@ SuppressWarnings ("serial" )
42
- JPanel p = new JPanel () {
41
+ TestBean tb = new TestBean () {
43
42
@ SuppressWarnings ("unused" )
44
- JTextField name = new JTextField ();
43
+ StringBuilder name = new StringBuilder ();
45
44
};
46
45
47
- DirectFieldAccessor dfa = new DirectFieldAccessor (p );
48
- assertEquals (JTextField .class , dfa .getPropertyType ("name" ));
46
+ DirectFieldAccessor dfa = new DirectFieldAccessor (tb );
47
+ assertEquals (StringBuilder .class , dfa .getPropertyType ("name" ));
49
48
}
50
49
51
50
}
You can’t perform that action at this time.
0 commit comments