Search in sources :

Example 1 with PersonReference

use of org.apache.servicecomb.provider.pojo.PersonReference in project java-chassis by ServiceComb.

the class TestRpcReferenceProcessor method testReference.

@Test
public void testReference(@Injectable ApplicationContext applicationContext) {
    SCBEngine scbEngine = SCBBootstrap.createSCBEngineForTest();
    PersonReference bean = new PersonReference();
    Assert.assertNull(bean.person);
    consumers.setEmbeddedValueResolver((strVal) -> strVal);
    Assert.assertSame(bean, consumers.postProcessBeforeInitialization(bean, "id"));
    Assert.assertNotNull(bean.person);
    scbEngine.destroy();
}
Also used : SCBEngine(org.apache.servicecomb.core.SCBEngine) PersonReference(org.apache.servicecomb.provider.pojo.PersonReference) Test(org.junit.Test)

Example 2 with PersonReference

use of org.apache.servicecomb.provider.pojo.PersonReference in project incubator-servicecomb-java-chassis by apache.

the class TestRpcReferenceProcessor method testReference.

@Test
public void testReference(@Injectable ApplicationContext applicationContext) throws Exception {
    PersonReference bean = new PersonReference();
    Assert.assertNull(bean.person);
    consumers.setEmbeddedValueResolver((strVal) -> strVal);
    Assert.assertSame(bean, consumers.postProcessBeforeInitialization(bean, "id"));
    Assert.assertNotNull(bean.person);
}
Also used : PersonReference(org.apache.servicecomb.provider.pojo.PersonReference) Test(org.junit.Test)

Aggregations

PersonReference (org.apache.servicecomb.provider.pojo.PersonReference)2 Test (org.junit.Test)2 SCBEngine (org.apache.servicecomb.core.SCBEngine)1