use of org.apache.felix.scr.impl.manager.components.T1 in project felix by apache.
the class BindMethodTest method testMethod.
private void testMethod(final String methodName, final T1 component, final DSVersion dsVersion, final String expectCallPerformed) {
ComponentContainer container = newContainer();
SingleComponentManager icm = new SingleComponentManager(container, new ComponentMethodsImpl());
BindMethod bm = new BindMethod(methodName, component.getClass(), FakeService.class.getName(), dsVersion, false);
RefPair refPair = new SingleRefPair(m_serviceReference);
ComponentContextImpl<T1> cc = new ComponentContextImpl(icm, new MockBundle(), null);
assertTrue(bm.getServiceObject(cc, refPair, m_context, icm));
BindParameters bp = new BindParameters(cc, refPair);
bm.invoke(component, bp, null, icm);
assertEquals(expectCallPerformed, component.callPerformed);
}
use of org.apache.felix.scr.impl.manager.components.T1 in project felix by apache.
the class BindMethodTest method test_privateT1.
public void test_privateT1() {
testMethod("privateT1", new T1(), DSVersion.DS10, null);
testMethod("privateT1", new T1(), DSVersion.DS11, null);
testMethod("privateT1", new T2(), DSVersion.DS10, null);
testMethod("privateT1", new T2(), DSVersion.DS11, null);
testMethod("privateT1", new T3(), DSVersion.DS10, null);
testMethod("privateT1", new T3(), DSVersion.DS11, null);
}
use of org.apache.felix.scr.impl.manager.components.T1 in project felix by apache.
the class BindMethodTest method test_privateT2SI.
public void test_privateT2SI() {
testMethod("privateT2SI", new T1(), DSVersion.DS10, null);
testMethod("privateT2SI", new T1(), DSVersion.DS11, null);
testMethod("privateT2SI", new T2(), DSVersion.DS10, null);
testMethod("privateT2SI", new T2(), DSVersion.DS11, "privateT2SI");
}
use of org.apache.felix.scr.impl.manager.components.T1 in project felix by apache.
the class BindMethodTest method test_privateT2SSIMap.
public void test_privateT2SSIMap() {
testMethod("privateT2SSIMap", new T1(), DSVersion.DS10, null);
testMethod("privateT2SSIMap", new T1(), DSVersion.DS11, null);
testMethod("privateT2SSIMap", new T2(), DSVersion.DS10, null);
testMethod("privateT2SSIMap", new T2(), DSVersion.DS11, "privateT2SSIMap");
}
use of org.apache.felix.scr.impl.manager.components.T1 in project felix by apache.
the class BindMethodTest method test_packageT2SR.
public void test_packageT2SR() {
testMethod("packageT2SR", new T1(), DSVersion.DS10, null);
testMethod("packageT2SR", new T1(), DSVersion.DS11, null);
testMethod("packageT2SR", new T2(), DSVersion.DS10, null);
testMethod("packageT2SR", new T2(), DSVersion.DS11, "packageT2SR");
}
Aggregations