Search in sources :

Example 1 with ComplexTestType

use of joynr.tests.testTypes.ComplexTestType in project joynr by bmwcarit.

the class AbstractProviderProxyEnd2EndTest method syncMethodCallWithArrayParameter.

@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void syncMethodCallWithArrayParameter() {
    ProxyBuilder<testProxy> proxyBuilder = consumerRuntime.getProxyBuilder(domain, testProxy.class);
    testProxy proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
    ComplexTestType customParam = new ComplexTestType(1, 2);
    ComplexTestType2[] customListParam = { new ComplexTestType2(3, 4), new ComplexTestType2(5, 6) };
    proxy.methodCustomCustomListParameters(customParam, customListParam);
}
Also used : joynr.tests.testProxy(joynr.tests.testProxy) ComplexTestType2(joynr.tests.testTypes.ComplexTestType2) ComplexTestType(joynr.tests.testTypes.ComplexTestType) Test(org.junit.Test)

Example 2 with ComplexTestType

use of joynr.tests.testTypes.ComplexTestType in project joynr by bmwcarit.

the class AbstractProviderProxyEnd2EndTest method overloadedMethodWithDifferentReturnTypes.

@Test(timeout = CONST_DEFAULT_TEST_TIMEOUT)
public void overloadedMethodWithDifferentReturnTypes() throws DiscoveryException, JoynrIllegalStateException, InterruptedException {
    ProxyBuilder<testProxy> proxyBuilder = consumerRuntime.getProxyBuilder(domain, testProxy.class);
    testProxy proxy = proxyBuilder.setMessagingQos(messagingQos).setDiscoveryQos(discoveryQos).build();
    ComplexTestType expectedResult1 = new ComplexTestType(42, 42);
    ComplexTestType2 expectedResult2 = new ComplexTestType2(43, 44);
    ComplexTestType result1 = proxy.overloadedOperation("42");
    ComplexTestType2 result2 = proxy.overloadedOperation("43", "44");
    assertEquals(expectedResult1, result1);
    assertEquals(expectedResult2, result2);
}
Also used : joynr.tests.testProxy(joynr.tests.testProxy) ComplexTestType2(joynr.tests.testTypes.ComplexTestType2) ComplexTestType(joynr.tests.testTypes.ComplexTestType) Test(org.junit.Test)

Aggregations

joynr.tests.testProxy (joynr.tests.testProxy)2 ComplexTestType (joynr.tests.testTypes.ComplexTestType)2 ComplexTestType2 (joynr.tests.testTypes.ComplexTestType2)2 Test (org.junit.Test)2