use of org.apache.felix.ipojo.Factory in project felix by apache.
the class TestComp0 method setUp.
@Before
public void setUp() {
tataFactory = (ComponentFactory) ipojoHelper.getFactory("tata");
totoFactory = (ComponentFactory) ipojoHelper.getFactory("toto");
tataFactory2 = (ComponentFactory) ipojoHelper.getFactory("comp-6");
tataFactory2.stop();
tataFactory.stop();
Properties props = new Properties();
props.put("instance.name", "toto provider");
try {
totoProv = totoFactory.createComponentInstance(props);
} catch (Exception e) {
fail("Cannot create an instance : " + e.getMessage());
}
Properties props3 = new Properties();
props3.put("instance.name", "toto provider 2");
try {
totoProv2 = totoFactory.createComponentInstance(props3);
} catch (Exception e) {
fail("Cannot create an instance : " + e.getMessage());
}
totoProv.stop();
totoProv2.stop();
Factory factory = ipojoHelper.getFactory("comp-0");
Properties props2 = new Properties();
props2.put("instance.name", "ff");
try {
under = factory.createComponentInstance(props2);
} catch (Exception e) {
e.printStackTrace();
fail("Cannot create an instance : " + e.getMessage());
}
}
use of org.apache.felix.ipojo.Factory in project felix by apache.
the class TestComp1 method setUp.
@Before
public void setUp() {
tataFactory = (ComponentFactory) ipojoHelper.getFactory("tata");
totoFactory = (ComponentFactory) ipojoHelper.getFactory("toto");
tataFactory2 = (ComponentFactory) ipojoHelper.getFactory("comp-6");
tataFactory2.stop();
tataFactory.stop();
Properties props = new Properties();
props.put("instance.name", "toto provider");
try {
totoProv = totoFactory.createComponentInstance(props);
} catch (Exception e) {
e.printStackTrace();
}
Properties props3 = new Properties();
props3.put("instance.name", "toto provider 2");
try {
totoProv2 = totoFactory.createComponentInstance(props3);
} catch (Exception e) {
e.printStackTrace();
}
totoProv.stop();
totoProv2.stop();
Factory factory = ipojoHelper.getFactory("comp-1");
Properties props2 = new Properties();
try {
under = factory.createComponentInstance(props2);
} catch (Exception e) {
fail("Cannot create the instance : " + e.getMessage());
}
}
use of org.apache.felix.ipojo.Factory in project felix by apache.
the class TestComp3 method setUp.
@Before
public void setUp() {
tataFactory = (ComponentFactory) ipojoHelper.getFactory("tata");
totoFactory = (ComponentFactory) ipojoHelper.getFactory("toto");
tataFactory2 = (ComponentFactory) ipojoHelper.getFactory("comp-6");
tataFactory2.stop();
tataFactory.stop();
Properties props = new Properties();
props.put("instance.name", "toto provider");
try {
totoProv = totoFactory.createComponentInstance(props);
} catch (Exception e) {
e.printStackTrace();
}
Properties props3 = new Properties();
props3.put("instance.name", "toto provider 2");
try {
totoProv2 = totoFactory.createComponentInstance(props3);
} catch (Exception e) {
e.printStackTrace();
}
totoProv.stop();
totoProv2.stop();
Factory factory = ipojoHelper.getFactory("comp-3");
Properties props2 = new Properties();
props2.put("instance.name", "ff");
try {
under = factory.createComponentInstance(props2);
} catch (Exception e) {
e.printStackTrace();
}
}
use of org.apache.felix.ipojo.Factory in project felix by apache.
the class TestComp4 method setUp.
@Before
public void setUp() {
tataFactory = (ComponentFactory) ipojoHelper.getFactory("tata");
totoFactory = (ComponentFactory) ipojoHelper.getFactory("toto");
tataFactory2 = (ComponentFactory) ipojoHelper.getFactory("comp-6");
tataFactory2.stop();
tataFactory.stop();
Properties props = new Properties();
props.put("instance.name", "toto provider");
try {
totoProv = totoFactory.createComponentInstance(props);
} catch (Exception e) {
e.printStackTrace();
}
Properties props3 = new Properties();
props3.put("instance.name", "toto provider 2");
try {
totoProv2 = totoFactory.createComponentInstance(props3);
} catch (Exception e) {
e.printStackTrace();
}
totoProv.stop();
totoProv2.stop();
Factory factory = ipojoHelper.getFactory("comp-4");
Properties props2 = new Properties();
props2.put("instance.name", "ff");
try {
under = factory.createComponentInstance(props2);
} catch (Exception e) {
e.printStackTrace();
}
}
use of org.apache.felix.ipojo.Factory in project felix by apache.
the class TestComp8 method setUp.
@Before
public void setUp() {
tataFactory = (ComponentFactory) ipojoHelper.getFactory("tata");
totoFactory = (ComponentFactory) ipojoHelper.getFactory("toto");
tataFactory2 = (ComponentFactory) ipojoHelper.getFactory("comp-6");
tataFactory2.stop();
Properties props = new Properties();
props.put("instance.name", "toto provider");
try {
totoProv = totoFactory.createComponentInstance(props);
} catch (Exception e) {
e.printStackTrace();
}
Properties props3 = new Properties();
props3.put("instance.name", "toto provider 2");
try {
totoProv2 = totoFactory.createComponentInstance(props3);
} catch (Exception e) {
e.printStackTrace();
}
totoProv.stop();
totoProv2.stop();
Factory factory = ipojoHelper.getFactory("comp-8");
Properties props2 = new Properties();
props2.put("instance.name", "ff");
try {
under = factory.createComponentInstance(props2);
} catch (Exception e) {
e.printStackTrace();
}
tataFactory.stop();
}
Aggregations