use of org.apache.dubbo.qos.legacy.service.DemoService in project dubbo by alibaba.
the class ListTelnetHandlerTest method testListService.
@Test
public void testListService() throws RemotingException {
mockChannel = mock(Channel.class);
given(mockChannel.getAttribute("telnet.service")).willReturn(DemoService.class.getName());
registerProvider(DemoService.class.getName(), new DemoServiceImpl(), DemoService.class);
String result = list.telnet(mockChannel, "DemoService");
for (Method method : DemoService.class.getMethods()) {
assertTrue(result.contains(method.getName()));
}
}
use of org.apache.dubbo.qos.legacy.service.DemoService in project dubbo by alibaba.
the class ListTelnetHandlerTest method testListDetailService.
@Test
public void testListDetailService() throws RemotingException {
mockChannel = mock(Channel.class);
given(mockChannel.getAttribute("telnet.service")).willReturn(DemoService.class.getName());
registerProvider(DemoService.class.getName(), new DemoServiceImpl(), DemoService.class);
String result = list.telnet(mockChannel, "-l DemoService");
for (Method method : DemoService.class.getMethods()) {
assertTrue(result.contains(ReflectUtils.getName(method)));
}
}
Aggregations