use of org.apache.felix.ipojo.extender.InstanceBuilder in project felix by apache.
the class DefaultInstanceBuilderTestCase method testDeepConfiguration.
public void testDeepConfiguration() throws Exception {
InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type");
assertNotNull(builder.configure());
}
use of org.apache.felix.ipojo.extender.InstanceBuilder in project felix by apache.
the class DefaultInstanceBuilderTestCase method testNoConfiguration.
public void testNoConfiguration() throws Exception {
InstanceBuilder builder = new DefaultInstanceBuilder(m_bundleContext, "type");
DeclarationHandle handle = builder.build();
InstanceDeclaration did = (InstanceDeclaration) handle;
assertEquals("type", did.getComponentName());
assertEquals(InstanceDeclaration.UNNAMED_INSTANCE, did.getInstanceName());
assertNull(did.getComponentVersion());
Dictionary<String, Object> configuration = did.getConfiguration();
assertTrue(configuration.isEmpty());
}
Aggregations