use of io.joynr.provider.JoynrProvider in project joynr by bmwcarit.
the class ProviderWrapperTest method testInvokeVoidReturnMethod.
@Test
public void testInvokeVoidReturnMethod() throws Throwable {
ProviderWrapper subject = createSubject();
JoynrProvider proxy = createProxy(subject);
Method method = TestServiceProviderInterface.class.getMethod("testServiceMethodVoidReturn");
Object result = subject.invoke(proxy, method, new Object[0]);
assertTrue(result instanceof Promise);
}
use of io.joynr.provider.JoynrProvider in project joynr by bmwcarit.
the class ShutdownTest method unregisterMultibleProvidersBeforeShutdown.
@Test
public void unregisterMultibleProvidersBeforeShutdown() throws JoynrWaitExpiredException, JoynrRuntimeException, InterruptedException, ApplicationException {
int providercount = 10;
JoynrProvider[] providers = new JoynrProvider[providercount];
for (int i = 0; i < providers.length; i++) {
providerQos = new ProviderQos();
providerQos.setScope(ProviderScope.LOCAL);
providerQos.setPriority(System.currentTimeMillis());
providers[i] = new DefaulttestProvider();
Future<Void> registerFinished = dummyApplication.getRuntime().registerProvider("ShutdownTestdomain" + i, providers[i], providerQos);
registerFinished.get();
}
for (int i = 0; i < providers.length; i++) {
dummyApplication.getRuntime().unregisterProvider("ShutdownTestdomain" + i, providers[i]);
}
dummyApplication.shutdown();
}
Aggregations