Search in sources :

Example 6 with ExtendedExtendedEnumeration

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

the class IltConsumerSyncMethodTest method callOverloadedMethodWithSelector_3.

@Test
public void callOverloadedMethodWithSelector_3() {
    LOG.info(name.getMethodName() + "");
    try {
        OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned result;
        ExtendedExtendedEnumeration[] enumArrayArg = IltUtil.createExtendedExtendedEnumerationArray();
        Long int64arg = 1L;
        BaseStruct baseStructArg = IltUtil.createBaseStruct();
        Boolean booleanArg = false;
        result = testInterfaceProxy.overloadedMethodWithSelector(enumArrayArg, int64arg, baseStructArg, booleanArg);
        if (result == null) {
            fail(name.getMethodName() + " - FAILED - got no result");
            return;
        }
        if (!IltUtil.cmpDouble(result.doubleOut, 1.1d) || !IltUtil.checkExtendedBaseStruct(result.extendedBaseStructOut) || !IltUtil.checkStringArray(result.stringArrayOut)) {
            fail(name.getMethodName() + " - FAILED - got invalid result");
            return;
        }
    } catch (Exception e) {
        fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
        return;
    }
    LOG.info(name.getMethodName() + " - OK");
}
Also used : OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned(joynr.interlanguagetest.TestInterfaceSync.OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned) ExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedBaseStruct) BaseStruct(joynr.interlanguagetest.namedTypeCollection2.BaseStruct) ExtendedExtendedEnumeration(joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedEnumeration) ApplicationException(joynr.exceptions.ApplicationException) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException) Test(org.junit.Test)

Example 7 with ExtendedExtendedEnumeration

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

the class IltProviderBean method overloadedMethodWithSelector.

/*
     * overloadedMethodWithSelector (3)
     */
@Override
public OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned overloadedMethodWithSelector(ExtendedExtendedEnumeration[] enumArrayArg, Long int64Arg, BaseStruct baseStructArg, Boolean booleanArg) {
    logger.warn("*************************************************");
    logger.warn("* IltProvider.overloadedMethodWithSelector called");
    logger.warn("*************************************************");
    /* check input */
    if (!IltUtil.checkExtendedExtendedEnumerationArray(enumArrayArg)) {
        throw new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare enumArrayArg");
    }
    if (int64Arg != 1L) {
        throw new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare int64Arg");
    }
    if (!IltUtil.checkBaseStruct(baseStructArg)) {
        throw new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare baseStructArg");
    }
    if (booleanArg) {
        throw new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare booleanArg");
    }
    /* prepare output */
    Double doubleOut = 1.1d;
    String[] stringArrayOut = IltUtil.createStringArray();
    ExtendedBaseStruct extendedBaseStructOut = IltUtil.createExtendedBaseStruct();
    return new OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned(doubleOut, stringArrayOut, extendedBaseStructOut);
}
Also used : ExtendedExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct) ExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedBaseStruct) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException)

Example 8 with ExtendedExtendedEnumeration

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

the class IltProviderBean method overloadedMethod.

/*
     * overloadedMethod (3)
     */
@Override
public OverloadedMethodOverloadedMethod1Returned overloadedMethod(ExtendedExtendedEnumeration[] enumArrayArg, Long int64Arg, BaseStruct baseStructArg, Boolean booleanArg) {
    logger.warn("*****************************************");
    logger.warn("* IltProvider.overloadedMethod called (3)");
    logger.warn("*****************************************");
    // check input parameter
    if (int64Arg != 1L || booleanArg) {
        logger.warn("overloadedMethod_3: invalid argument int64Arg or booleanArg");
        throw new ProviderRuntimeException("overloadedMethod_3: invalid parameter int64Arg or booleanArg");
    }
    // check enumArrayArg
    if (!IltUtil.checkExtendedExtendedEnumerationArray(enumArrayArg)) {
        throw new ProviderRuntimeException("overloadedMethod_3: invalid parameter enumArrayArg");
    }
    // check baseStructArg
    if (!IltUtil.checkBaseStruct(baseStructArg)) {
        logger.warn("overloadedMethod_3: invalid argument baseStructArg");
        throw new ProviderRuntimeException("overloadedMethod_3: invalid parameter baseStructArg");
    }
    // setup output parameter
    Double doubleOut = 0d;
    String[] stringArrayOut = IltUtil.createStringArray();
    ExtendedBaseStruct extendedBaseStructOut = IltUtil.createExtendedBaseStruct();
    return new OverloadedMethodOverloadedMethod1Returned(doubleOut, stringArrayOut, extendedBaseStructOut);
}
Also used : ExtendedExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct) ExtendedBaseStruct(joynr.interlanguagetest.namedTypeCollection2.ExtendedBaseStruct) MapStringString(joynr.interlanguagetest.namedTypeCollection2.MapStringString) ProviderRuntimeException(joynr.exceptions.ProviderRuntimeException)

Aggregations

ProviderRuntimeException (joynr.exceptions.ProviderRuntimeException)8 ExtendedBaseStruct (joynr.interlanguagetest.namedTypeCollection2.ExtendedBaseStruct)8 ApplicationException (joynr.exceptions.ApplicationException)4 BaseStruct (joynr.interlanguagetest.namedTypeCollection2.BaseStruct)4 ExtendedExtendedBaseStruct (joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedBaseStruct)4 ExtendedExtendedEnumeration (joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedEnumeration)4 MapStringString (joynr.interlanguagetest.namedTypeCollection2.MapStringString)4 Test (org.junit.Test)4 Promise (io.joynr.provider.Promise)2 OverloadedMethodOverloadedMethod1Returned (joynr.interlanguagetest.TestInterfaceSync.OverloadedMethodOverloadedMethod1Returned)2 OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned (joynr.interlanguagetest.TestInterfaceSync.OverloadedMethodWithSelectorOverloadedMethodWithSelector1Returned)2