Package info.archinnov.achilles.test.mapping.entity

Examples of info.archinnov.achilles.test.mapping.entity.UserBean


        assertThat(proxifier.buildProxyWithAllFieldsLoadedExceptCounters(null, context)).isNull();
    }

    @Test
    public void should_get_real_object_from_proxy() throws Exception {
        UserBean realObject = new UserBean();
        when(interceptor.getTarget()).thenReturn(realObject);

        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(UserBean.class);
        enhancer.setCallback(interceptor);
        UserBean proxy = (UserBean) enhancer.create();

        UserBean actual = proxifier.getRealObject(proxy);

        assertThat(actual).isSameAs(realObject);
    }
View Full Code Here


        assertThat(actual).isSameAs(realObject);
    }

    @Test
    public void should_return_object_when_get_real_object_called_on_non_proxified_entity() throws Exception {
        UserBean realObject = new UserBean();

        UserBean actual = proxifier.getRealObject(realObject);
        assertThat(actual).isSameAs(realObject);

    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.test.mapping.entity.UserBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.