Search in sources :

Example 1 with Person

use of org.apache.dubbo.service.Person in project dubbo by alibaba.

the class MethodConfigTest method testConvertMethodConfig2AsyncInfo.

@Test
public void testConvertMethodConfig2AsyncInfo() throws Exception {
    org.apache.dubbo.config.MethodConfig methodConfig = new org.apache.dubbo.config.MethodConfig();
    methodConfig.setOninvokeMethod("setName");
    methodConfig.setOninvoke(new Person());
    AsyncMethodInfo methodInfo = org.apache.dubbo.config.MethodConfig.convertMethodConfig2AsyncInfo(methodConfig);
    assertEquals(methodInfo.getOninvokeMethod(), Person.class.getMethod("setName", String.class));
}
Also used : MethodConfig(com.alibaba.dubbo.config.MethodConfig) AsyncMethodInfo(org.apache.dubbo.rpc.model.AsyncMethodInfo) Person(org.apache.dubbo.service.Person) Test(org.junit.jupiter.api.Test)

Aggregations

MethodConfig (com.alibaba.dubbo.config.MethodConfig)1 AsyncMethodInfo (org.apache.dubbo.rpc.model.AsyncMethodInfo)1 Person (org.apache.dubbo.service.Person)1 Test (org.junit.jupiter.api.Test)1