use of com.tvd12.ezyfoxserver.testing.jaxberror.ClassA in project properties-file by tvd12.
the class SetterMethodTest method test.
@Test
public void test() {
Method method = MethodBuilder.create().clazz(ClassA.class).method("setName").argument(String.class).build();
SetterMethod setterMethod = new SetterMethod(new PropertyAnnotations());
setterMethod.initWithMethod(method);
setterMethod.invoke(new ClassA(), "123");
}
use of com.tvd12.ezyfoxserver.testing.jaxberror.ClassA in project properties-file by tvd12.
the class PropertiesMapperTest method testMapPropertiesToBean.
@Test
public void testMapPropertiesToBean() {
Properties properties = new Properties();
properties.setProperty("name", "hello");
properties.put("age", 24);
properties.put("clazz", ClassA.class.getName());
properties.put("date", new SimpleDateFormat(Dates.getPattern()).format(new Date()));
ClassA object = new PropertiesMapper().data(properties).clazz(ClassA.class).map();
assertEquals(object.getName(), "hello");
assertEquals(object.getAge(), 24);
assertEquals(object.getMoney(), 10);
assertEquals(object.getClazz(), ClassA.class);
assertNotNull(object.getDate());
}
use of com.tvd12.ezyfoxserver.testing.jaxberror.ClassA in project properties-file by tvd12.
the class SetterMethodTest method test.
@Test
public void test() {
Method method = MethodBuilder.create().clazz(ClassA.class).method("setName").argument(String.class).build();
SetterMethod setterMethod = new SetterMethod(new PropertyAnnotations());
setterMethod.initWithMethod(method);
setterMethod.invoke(new ClassA(), "123");
}
use of com.tvd12.ezyfoxserver.testing.jaxberror.ClassA in project properties-file by tvd12.
the class SetterMethodTest method testInvalidCase.
@Test(expectedExceptions = { IllegalStateException.class })
public void testInvalidCase() {
Method method = MethodBuilder.create().clazz(ClassA.class).method("setValues").argument(String.class).argument(String.class).build();
SetterMethod setterMethod = new SetterMethod(new PropertyAnnotations());
setterMethod.initWithMethod(method);
setterMethod.invoke(new ClassA(), "123");
}
use of com.tvd12.ezyfoxserver.testing.jaxberror.ClassA in project calabash by youngmonkeys.
the class PrototypesTest method test.
@Test
public void test() {
Prototypes prototypes = Prototypes.builder().addProxy(new ClassBProxy()).addProxy(new ClassAProxy()).build();
ClassA origin = new ClassA();
ClassA copy = prototypes.copy(origin);
assert copy != origin;
}
Aggregations