File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/test/java/org/apache/ibatis/reflection Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,18 @@ public void shouldTestDataTypeOfGenericMethod() {
48
48
assertEquals (Long .class , meta .getSetterType ("id" ));
49
49
}
50
50
51
+ @ Test
52
+ public void shouldThrowReflectionExceptionGetGetterType () throws Exception {
53
+ try {
54
+ ReflectorFactory reflectorFactory = new DefaultReflectorFactory ();
55
+ MetaClass meta = MetaClass .forClass (RichType .class , reflectorFactory );
56
+ meta .getGetterType ("aString" );
57
+ org .junit .Assert .fail ("should have thrown ReflectionException" );
58
+ } catch (ReflectionException expected ) {
59
+ assertEquals ("There is no getter for property named \' aString\' in \' class org.apache.ibatis.domain.misc.RichType\' " , expected .getMessage ());
60
+ }
61
+ }
62
+
51
63
@ Test
52
64
public void shouldCheckGetterExistance () {
53
65
ReflectorFactory reflectorFactory = new DefaultReflectorFactory ();
You can’t perform that action at this time.
0 commit comments