use of com.alibaba.dubbo.config.ModuleConfig in project dubbo by alibaba.
the class DubboConfigConfigurationTest method testSingle.
@Test
public void testSingle() throws IOException {
context.register(DubboConfigConfiguration.Single.class);
context.refresh();
// application
ApplicationConfig applicationConfig = context.getBean("applicationBean", ApplicationConfig.class);
Assert.assertEquals("dubbo-demo-application", applicationConfig.getName());
// module
ModuleConfig moduleConfig = context.getBean("moduleBean", ModuleConfig.class);
Assert.assertEquals("dubbo-demo-module", moduleConfig.getName());
// registry
RegistryConfig registryConfig = context.getBean(RegistryConfig.class);
Assert.assertEquals("zookeeper://192.168.99.100:32770", registryConfig.getAddress());
// protocol
ProtocolConfig protocolConfig = context.getBean(ProtocolConfig.class);
Assert.assertEquals("dubbo", protocolConfig.getName());
Assert.assertEquals(Integer.valueOf(20880), protocolConfig.getPort());
}
Aggregations