use of joynr.tests.testSync.MethodWithMultipleOutputParametersReturned in project joynr by bmwcarit.
the class AbstractProviderProxyEnd2EndTest method calledMethodReturnsMultipleOutputParameters.
@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void calledMethodReturnsMultipleOutputParameters() throws Exception {
ProxyBuilder<testProxy> proxyBuilder = consumerRuntime.getProxyBuilder(domain, testProxy.class);
testProxy proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
MethodWithMultipleOutputParametersReturned result = proxy.methodWithMultipleOutputParameters();
assertEquals(TEST_INTEGER, result.aNumber);
assertEquals(TEST_STRING, result.aString);
assertEquals(TEST_COMPLEXTYPE, result.aComplexDataType);
assertEquals(TEST_ENUM, result.anEnumResult);
}
use of joynr.tests.testSync.MethodWithMultipleOutputParametersReturned in project joynr by bmwcarit.
the class AbstractProviderProxyEnd2EndTest method calledMethodReturnsMultipleOutputParametersAsyncFuture.
@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void calledMethodReturnsMultipleOutputParametersAsyncFuture() throws Exception {
ProxyBuilder<testProxy> proxyBuilder = consumerRuntime.getProxyBuilder(domain, testProxy.class);
testProxy proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
Future<MethodWithMultipleOutputParametersReturned> future = proxy.methodWithMultipleOutputParameters(new MethodWithMultipleOutputParametersCallback() {
@Override
public void onFailure(JoynrRuntimeException error) {
logger.error("error in calledMethodReturnsMultipleOutputParametersAsyncCallback", error);
}
@Override
public void onSuccess(String aString, Integer aNumber, GpsLocation aComplexDataType, TestEnum anEnumResult) {
assertEquals(TEST_INTEGER, aNumber);
assertEquals(TEST_STRING, aString);
assertEquals(TEST_COMPLEXTYPE, aComplexDataType);
assertEquals(TEST_ENUM, anEnumResult);
}
});
MethodWithMultipleOutputParametersReturned reply = future.get();
assertEquals(TEST_INTEGER, reply.aNumber);
assertEquals(TEST_STRING, reply.aString);
assertEquals(TEST_COMPLEXTYPE, reply.aComplexDataType);
assertEquals(TEST_ENUM, reply.anEnumResult);
}
Aggregations