|
@@ -78,6 +78,19 @@ class ReflectionKitTest {
|
|
Assertions.assertEquals(fieldMap.get("name"), A.class.getDeclaredField("name"));
|
|
Assertions.assertEquals(fieldMap.get("name"), A.class.getDeclaredField("name"));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ void testGetMethodCapitalize() throws NoSuchFieldException {
|
|
|
|
+ Field field = C.class.getDeclaredField("sex");
|
|
|
|
+ String getMethod = ReflectionKit.getMethodCapitalize(field, "sex");
|
|
|
|
+ Assertions.assertEquals("getSex", getMethod);
|
|
|
|
+ field = A.class.getDeclaredField("testWrap");
|
|
|
|
+ getMethod = ReflectionKit.getMethodCapitalize(field, "testWrap");
|
|
|
|
+ Assertions.assertEquals("getTestWrap", getMethod);
|
|
|
|
+ field = A.class.getDeclaredField("testSimple");
|
|
|
|
+ getMethod = ReflectionKit.getMethodCapitalize(field, "testSimple");
|
|
|
|
+ Assertions.assertEquals("isTestSimple", getMethod);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Test
|
|
@Test
|
|
void testGetMethodValue() {
|
|
void testGetMethodValue() {
|
|
C c = new C();
|
|
C c = new C();
|