use of com.alipay.sofa.runtime.spi.component.ComponentManager in project sofa-boot by sofastack.
the class IsleSpringComponentTest method test.
@Test
public void test() {
ComponentManager componentManager = sofaRuntimeContext.getComponentManager();
ComponentName componentName1 = ComponentNameFactory.createComponentName(SpringContextComponent.SPRING_COMPONENT_TYPE, "com.alipay.sofa.isle.module1");
ComponentName componentName2 = ComponentNameFactory.createComponentName(SpringContextComponent.SPRING_COMPONENT_TYPE, "com.alipay.sofa.isle.module2");
Assert.assertNotNull(componentManager.getComponentInfo(componentName1));
Assert.assertNotNull(componentManager.getComponentInfo(componentName2));
Assert.assertEquals("com.alipay.sofa.isle.module1", componentManager.getComponentInfo(componentName1).getApplicationContext().getId());
Assert.assertEquals("com.alipay.sofa.isle.module2", componentManager.getComponentInfo(componentName2).getApplicationContext().getId());
}
Aggregations