Search in sources :

Example 1 with ExtendedStructOfPrimitives

use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.

the class IltConsumerSyncMethodTest method callMethodWithMultipleStructParameters.

@Test
public void callMethodWithMultipleStructParameters() {
    LOG.info(name.getMethodName() + "");
    try {
        MethodWithMultipleStructParametersReturned result;
        // setup input parameters
        ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
        BaseStruct baseStructOut = IltUtil.createBaseStruct();
        result = testInterfaceProxy.methodWithMultipleStructParameters(extendedStructOfPrimitivesOut, baseStructOut);
        if (result == null) {
            fail(name.getMethodName() + " - FAILED - got no result");
            return;
        }
        if (!IltUtil.checkBaseStructWithoutElements(result.baseStructWithoutElementsOut)) {
            fail(name.getMethodName() + " - FAILED - got invalid result - baseStructWithoutElementsOut");
            return;
        }
        if (!IltUtil.checkExtendedExtendedBaseStruct(result.extendedExtendedBaseStructOut)) {
            fail(name.getMethodName() + " - FAILED - got invalid result - extendedExtendedBaseStructOut");
            return;
        }
    } catch (Exception e) {
        fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
        return;
    }
    LOG.info(name.getMethodName() + " - OK");
}
Also used : MethodWithMultipleStructParametersReturned(joynr.interlanguagetest.TestInterfaceSync.MethodWithMultipleStructParametersReturned) ExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedBaseStruct) BaseStruct(joynr.interlanguagetest.namedTypeCollection2.BaseStruct) ExtendedStructOfPrimitives(joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives) ApplicationException(joynr.exceptions.ApplicationException) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException) Test(org.junit.Test)

Example 2 with ExtendedStructOfPrimitives

use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.

the class IltUtil method createExtendedStructOfPrimitives.

public static ExtendedStructOfPrimitives createExtendedStructOfPrimitives() {
    ExtendedStructOfPrimitives extendedStructOfPrimitives = new ExtendedStructOfPrimitives();
    fillExtendedStructOfPrimitives(extendedStructOfPrimitives);
    return extendedStructOfPrimitives;
}
Also used : ExtendedStructOfPrimitives(joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives)

Example 3 with ExtendedStructOfPrimitives

use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.

the class IltProviderBean method methodToFireBroadcastWithSingleStructParameter.

/*
     * methodToFireBroadcastWithSingleStructParameter
     */
@Override
public void methodToFireBroadcastWithSingleStructParameter() {
    logger.warn("*******************************************************************");
    logger.warn("* IltProvider.methodToFireBroadcastWithSingleStructParameter called");
    logger.warn("*******************************************************************");
    ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
// TODO
// fireBroadcastWithSingleStructParameter(extendedStructOfPrimitivesOut);
}
Also used : ExtendedStructOfPrimitives(joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives)

Example 4 with ExtendedStructOfPrimitives

use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.

the class IltProviderBean method methodWithSingleStructParameters.

/*
     * methodWithSingleStructParameters
     */
@Override
public ExtendedStructOfPrimitives methodWithSingleStructParameters(ExtendedBaseStruct extendedBaseStructArg) {
    logger.warn("*****************************************************");
    logger.warn("* IltProvider.methodWithSingleStructParameters called");
    logger.warn("*****************************************************");
    if (!IltUtil.checkExtendedBaseStruct(extendedBaseStructArg)) {
        logger.error("methodWithSingleStructParameters: invalid parameter extendedBaseStructArg");
        throw new ProviderRuntimeException("methodWithSingleStructParameters: invalid parameter extendedBaseStructArg");
    }
    // prepare output parameters
    ExtendedStructOfPrimitives extendedStructOfPrimitivesOut = IltUtil.createExtendedStructOfPrimitives();
    return extendedStructOfPrimitivesOut;
}
Also used : ExtendedStructOfPrimitives(joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException)

Example 5 with ExtendedStructOfPrimitives

use of joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives in project joynr by bmwcarit.

the class IltProviderBean method methodWithMultipleStructParameters.

/*
     * methodWithMultipleStructParameters
     */
@Override
public MethodWithMultipleStructParametersReturned methodWithMultipleStructParameters(ExtendedStructOfPrimitives extendedStructOfPrimitivesArg, BaseStruct baseStructArg) {
    logger.warn("*******************************************************");
    logger.warn("* IltProvider.methodWithMultipleStructParameters called");
    logger.warn("*******************************************************");
    // check input parameter
    if (!IltUtil.checkExtendedStructOfPrimitives(extendedStructOfPrimitivesArg)) {
        throw new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter extendedStructOfPrimitivesArg");
    }
    if (!IltUtil.checkBaseStruct(baseStructArg)) {
        throw new ProviderRuntimeException("methodWithMultipleStructParameters: invalid parameter baseStructArg");
    }
    // set output values
    BaseStructWithoutElements baseStructWithoutElementsOut = IltUtil.createBaseStructWithoutElements();
    ExtendedExtendedBaseStruct extendedExtendedBaseStructOut = IltUtil.createExtendedExtendedBaseStruct();
    return new MethodWithMultipleStructParametersReturned(baseStructWithoutElementsOut, extendedExtendedBaseStructOut);
}
Also used : ExtendedExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct) BaseStructWithoutElements(joynr.interlanguagetest.namedTypeCollection2.BaseStructWithoutElements) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException)

Aggregations

ExtendedStructOfPrimitives (joynr.interlanguagetest.namedTypeCollection2.ExtendedStructOfPrimitives)11 ProviderRuntimeException (joynr.exceptions.ProviderRuntimeException)9 ApplicationException (joynr.exceptions.ApplicationException)5 Test (org.junit.Test)5 ExtendedBaseStruct (joynr.interlanguagetest.namedTypeCollection2.ExtendedBaseStruct)4 Promise (io.joynr.provider.Promise)3 MethodWithMultipleStructParametersReturned (joynr.interlanguagetest.TestInterfaceSync.MethodWithMultipleStructParametersReturned)3 BaseStruct (joynr.interlanguagetest.namedTypeCollection2.BaseStruct)3 BaseStructWithoutElements (joynr.interlanguagetest.namedTypeCollection2.BaseStructWithoutElements)3 ExtendedExtendedBaseStruct (joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct)3 JoynrRuntimeException (io.joynr.exceptions.JoynrRuntimeException)1 DeferredVoid (io.joynr.provider.DeferredVoid)1 MethodWithMultipleStructParametersCallback (joynr.interlanguagetest.TestInterfaceAsync.MethodWithMultipleStructParametersCallback)1 MethodWithMultipleStructParametersFuture (joynr.interlanguagetest.TestInterfaceAsync.MethodWithMultipleStructParametersFuture)1