use of org.apache.felix.scr.integration.components.ConstructorComponent in project felix by apache.
the class ComponentConstructorTest method test_constructor_singleRef.
@Test
public void test_constructor_singleRef() throws Exception {
final String componentname = "ConstructorComponent.refsingle";
ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.SATISFIED);
assertEquals(1, cc.description.init);
ConstructorComponent cmp = this.getServiceFromConfiguration(cc, ConstructorComponent.class);
final String msg = cmp.test();
assertNull(msg);
disableAndCheck(cc);
}
use of org.apache.felix.scr.integration.components.ConstructorComponent in project felix by apache.
the class ComponentConstructorTest method test_constructor_success.
@Test
public void test_constructor_success() throws Exception {
final String componentname = "ConstructorComponent.satisfied";
ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.SATISFIED);
assertEquals(4, cc.description.init);
ConstructorComponent cmp = this.getServiceFromConfiguration(cc, ConstructorComponent.class);
final String msg = cmp.test();
assertNull(msg);
disableAndCheck(cc);
}
use of org.apache.felix.scr.integration.components.ConstructorComponent in project felix by apache.
the class ComponentConstructorTest method test_constructor_multiRef.
@Test
public void test_constructor_multiRef() throws Exception {
final String componentname = "ConstructorComponent.refmulti";
ComponentConfigurationDTO cc = getDisabledConfigurationAndEnable(componentname, ComponentConfigurationDTO.SATISFIED);
assertEquals(1, cc.description.init);
ConstructorComponent cmp = this.getServiceFromConfiguration(cc, ConstructorComponent.class);
final String msg = cmp.test();
assertNull(msg);
disableAndCheck(cc);
}
Aggregations