use of org.apache.felix.scr.impl.manager.SingleRefPair 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);
}
Aggregations