use of org.springframework.test.util.subpackage.Person in project spring-framework by spring-projects.
the class ReflectionTestUtilsTests method setFieldAndGetFieldViaCglibProxy.
@Test
public void setFieldAndGetFieldViaCglibProxy() throws Exception {
ProxyFactory pf = new ProxyFactory(this.person);
pf.setProxyTargetClass(true);
Person proxy = (Person) pf.getProxy();
assertTrue("Proxy is a CGLIB proxy", AopUtils.isCglibProxy(proxy));
assertSetFieldAndGetFieldBehaviorForProxy(proxy, this.person);
}
use of org.springframework.test.util.subpackage.Person in project spring-framework by spring-projects.
the class ReflectionTestUtilsTests method setFieldAndGetFieldViaJdkDynamicProxy.
@Test
public void setFieldAndGetFieldViaJdkDynamicProxy() throws Exception {
ProxyFactory pf = new ProxyFactory(this.person);
pf.addInterface(Person.class);
Person proxy = (Person) pf.getProxy();
assertTrue("Proxy is a JDK dynamic proxy", AopUtils.isJdkDynamicProxy(proxy));
assertSetFieldAndGetFieldBehaviorForProxy(proxy, this.person);
}
Aggregations