Search in sources :

Example 6 with SetterMethod

use of com.tvd12.properties.file.struct.SetterMethod in project properties-file by tvd12.

the class SetterMethodTest method getKeyStartWithNotSet.

@Test
public void getKeyStartWithNotSet() throws Exception {
    // given
    SetterMethod method = new SetterMethod(new PropertyAnnotations());
    method.initWithMethod(ClassA.class.getDeclaredMethod("value", String.class));
    // when
    String key = method.getKey();
    // then
    assertEquals(key, "value");
}
Also used : PropertyAnnotations(com.tvd12.properties.file.annotation.PropertyAnnotations) SetterMethod(com.tvd12.properties.file.struct.SetterMethod) Test(org.testng.annotations.Test)

Aggregations

PropertyAnnotations (com.tvd12.properties.file.annotation.PropertyAnnotations)6 SetterMethod (com.tvd12.properties.file.struct.SetterMethod)6 Test (org.testng.annotations.Test)6 Method (java.lang.reflect.Method)4