use of joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedEnumeration in project joynr by bmwcarit.
the class IltConsumerSyncMethodTest method callOverloadedMethod_3.
@Test
public void callOverloadedMethod_3() {
LOG.info(name.getMethodName() + "");
try {
OverloadedMethodOverloadedMethod1Returned result;
ExtendedExtendedEnumeration[] enumArrayArg = IltUtil.createExtendedExtendedEnumerationArray();
Long int64Arg = 1L;
BaseStruct baseStructArg = IltUtil.createBaseStruct();
Boolean booleanArg = false;
result = testInterfaceProxy.overloadedMethod(enumArrayArg, int64Arg, baseStructArg, booleanArg);
if (result == null) {
fail(name.getMethodName() + " - FAILED - got no result");
return;
}
if (result.doubleOut != 0d || !IltUtil.checkStringArray(result.stringArrayOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - doubleOut");
return;
}
if (!IltUtil.checkExtendedBaseStruct(result.extendedBaseStructOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - extendedBaseStructOut");
return;
}
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedEnumeration in project joynr by bmwcarit.
the class IltProvider method overloadedMethodWithSelector.
/*
* overloadedMethodWithSelector (3)
*/
@Override
public Promise<OverloadedMethodWithSelector2Deferred> overloadedMethodWithSelector(ExtendedExtendedEnumeration[] enumArrayArg, Long int64Arg, BaseStruct baseStructArg, Boolean booleanArg) {
logger.warn("*************************************************");
logger.warn("* IltProvider.overloadedMethodWithSelector called");
logger.warn("*************************************************");
OverloadedMethodWithSelector2Deferred deferred = new OverloadedMethodWithSelector2Deferred();
/* check input */
if (!IltUtil.checkExtendedExtendedEnumerationArray(enumArrayArg)) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare enumArrayArg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
if (int64Arg != 1L) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare int64Arg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
if (!IltUtil.checkBaseStruct(baseStructArg)) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare baseStructArg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
if (booleanArg != false) {
deferred.reject(new ProviderRuntimeException("overloadedMethodWithSelector: failed to compare booleanArg"));
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
/* prepare output */
Double doubleOut = 1.1d;
String[] stringArrayOut = IltUtil.createStringArray();
ExtendedBaseStruct extendedBaseStructOut = IltUtil.createExtendedBaseStruct();
deferred.resolve(doubleOut, stringArrayOut, extendedBaseStructOut);
return new Promise<OverloadedMethodWithSelector2Deferred>(deferred);
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedEnumeration in project joynr by bmwcarit.
the class IltProvider method overloadedMethod.
/*
* overloadedMethod (3)
*/
@Override
public Promise<OverloadedMethod2Deferred> overloadedMethod(ExtendedExtendedEnumeration[] enumArrayArg, Long int64Arg, BaseStruct baseStructArg, Boolean booleanArg) {
logger.warn("*****************************************");
logger.warn("* IltProvider.overloadedMethod called (3)");
logger.warn("*****************************************");
OverloadedMethod2Deferred deferred = new OverloadedMethod2Deferred();
// check input parameter
if (int64Arg != 1L || booleanArg != false) {
logger.warn("overloadedMethod_3: invalid argument int64Arg or booleanArg");
deferred.reject(new ProviderRuntimeException("overloadedMethod_3: invalid parameter int64Arg or booleanArg"));
return new Promise<OverloadedMethod2Deferred>(deferred);
}
// check enumArrayArg
if (!IltUtil.checkExtendedExtendedEnumerationArray(enumArrayArg)) {
deferred.reject(new ProviderRuntimeException("overloadedMethod_3: invalid parameter enumArrayArg"));
return new Promise<OverloadedMethod2Deferred>(deferred);
}
// check baseStructArg
if (!IltUtil.checkBaseStruct(baseStructArg)) {
logger.warn("overloadedMethod_3: invalid argument baseStructArg");
deferred.reject(new ProviderRuntimeException("overloadedMethod_3: invalid parameter baseStructArg"));
return new Promise<OverloadedMethod2Deferred>(deferred);
}
// setup output parameter
Double doubleOut = 0d;
String[] stringArrayOut = IltUtil.createStringArray();
ExtendedBaseStruct extendedBaseStructOut = IltUtil.createExtendedBaseStruct();
deferred.resolve(doubleOut, stringArrayOut, extendedBaseStructOut);
return new Promise<OverloadedMethod2Deferred>(deferred);
}
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 (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");
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedExtendedEnumeration in project joynr by bmwcarit.
the class IltConsumerSyncMethodTest method callOverloadedMethod_3.
@Test
public void callOverloadedMethod_3() {
LOG.info(name.getMethodName() + "");
try {
OverloadedMethodOverloadedMethod1Returned result;
ExtendedExtendedEnumeration[] enumArrayArg = IltUtil.createExtendedExtendedEnumerationArray();
Long int64Arg = 1L;
BaseStruct baseStructArg = IltUtil.createBaseStruct();
Boolean booleanArg = false;
result = testInterfaceProxy.overloadedMethod(enumArrayArg, int64Arg, baseStructArg, booleanArg);
if (result == null) {
fail(name.getMethodName() + " - FAILED - got no result");
return;
}
if (result.doubleOut != 0d || !IltUtil.checkStringArray(result.stringArrayOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - doubleOut");
return;
}
if (!IltUtil.checkExtendedBaseStruct(result.extendedBaseStructOut)) {
fail(name.getMethodName() + " - FAILED - got invalid result - extendedBaseStructOut");
return;
}
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
Aggregations