File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
disconf-client/src/test/java/com/baidu/disconf/client/test/support/utils Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1- package com .baidu .disconf .client .support .utils ;
1+ package com .baidu .disconf .client .test . support .utils ;
22
33import static org .junit .Assert .assertTrue ;
44
77
88import org .junit .Test ;
99
10+ import com .baidu .disconf .client .support .utils .ClassUtils ;
11+
1012public class ClassUtilsTest {
1113
1214 @ SuppressWarnings ("unchecked" )
@@ -29,4 +31,12 @@ public void testGetValeByType() throws Exception {
2931 assertTrue (ClassUtils .getValeByType (List .class , "234.4,123" ) == null );
3032 }
3133
34+ @ Test
35+ public void testGetFieldNameByGetMethodName () {
36+ assertTrue (ClassUtils .getFieldNameByGetMethodName ("getOrderNo" ).equals ("orderNo" ));
37+ assertTrue (ClassUtils .getFieldNameByGetMethodName ("isSended" ).equals ("sended" ));
38+ assertTrue (ClassUtils .getFieldNameByGetMethodName ("isA" ).equals ("a" ));
39+ assertTrue (ClassUtils .getFieldNameByGetMethodName ("someMethod" ) == null );
40+ }
41+
3242}
You can’t perform that action at this time.
0 commit comments