use of joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection in project joynr by bmwcarit.
the class IltConsumerSyncMethodTest method callMethodWithMultipleEnumParameters.
@Test
public void callMethodWithMultipleEnumParameters() {
LOG.info(name.getMethodName() + "");
try {
joynr.interlanguagetest.Enumeration enumerationArg;
ExtendedTypeCollectionEnumerationInTypeCollection extendedEnumerationArg;
MethodWithMultipleEnumParametersReturned result;
enumerationArg = joynr.interlanguagetest.Enumeration.ENUM_0_VALUE_3;
extendedEnumerationArg = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
result = testInterfaceProxy.methodWithMultipleEnumParameters(enumerationArg, extendedEnumerationArg);
if (result == null) {
fail(name.getMethodName() + " - FAILED - got no result");
return;
}
if (result.enumerationOut != Enumeration.ENUM_0_VALUE_1 || result.extendedEnumerationOut != ExtendedEnumerationWithPartlyDefinedValues.ENUM_2_VALUE_EXTENSION_FOR_ENUM_WITHOUT_DEFINED_VALUES) {
LOG.info(name.getMethodName() + " - FAILED");
fail(name.getMethodName() + " - FAILED - got invalid result - enumerationOut");
return;
}
} catch (Exception e) {
fail(name.getMethodName() + " - FAILED - caught unexpected exception: " + e.getMessage());
return;
}
LOG.info(name.getMethodName() + " - OK");
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection in project joynr by bmwcarit.
the class IltProvider method methodToFireBroadcastWithFiltering.
/*
* methodToFireBroadcastWithFiltering
*/
@Override
public Promise<DeferredVoid> methodToFireBroadcastWithFiltering(String stringArg) {
logger.warn("*******************************************************");
logger.warn("* IltProvider.methodToFireBroadcastWithFiltering called");
logger.warn("*******************************************************");
DeferredVoid deferred = new DeferredVoid();
// take the stringArg as input for the filtering
String stringOut = stringArg;
String[] stringArrayOut = IltUtil.createStringArray();
ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
StructWithStringArray structWithStringArrayOut = IltUtil.createStructWithStringArray();
StructWithStringArray[] structWithStringArrayArrayOut = IltUtil.createStructWithStringArrayArray();
fireBroadcastWithFiltering(stringOut, stringArrayOut, enumerationOut, structWithStringArrayOut, structWithStringArrayArrayOut);
deferred.resolve();
return new Promise<DeferredVoid>(deferred);
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection in project joynr by bmwcarit.
the class IltProvider method methodWithMultipleEnumParameters.
/*
* methodWithMultipleEnumParameters
*
* return fixed values for now
*/
@Override
public Promise<MethodWithMultipleEnumParametersDeferred> methodWithMultipleEnumParameters(Enumeration enumerationArg, ExtendedTypeCollectionEnumerationInTypeCollection extendedEnumerationArg) {
logger.warn("*****************************************************");
logger.warn("* IltProvider.methodWithMultipleEnumParameters called");
logger.warn("*****************************************************");
MethodWithMultipleEnumParametersDeferred deferred = new MethodWithMultipleEnumParametersDeferred();
// check input parameters
if (enumerationArg != joynr.interlanguagetest.Enumeration.ENUM_0_VALUE_3 || extendedEnumerationArg != ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION) {
logger.warn("methodWithMultipleEnumParameters: invalid argument enumerationArg or extendedEnumerationArg");
deferred.reject(new ProviderRuntimeException("methodWithMultipleEnumParameters: received wrong argument"));
return new Promise<MethodWithMultipleEnumParametersDeferred>(deferred);
}
// prepare output parameters
ExtendedEnumerationWithPartlyDefinedValues extendedEnumerationOut = ExtendedEnumerationWithPartlyDefinedValues.ENUM_2_VALUE_EXTENSION_FOR_ENUM_WITHOUT_DEFINED_VALUES;
Enumeration enumerationOut = Enumeration.ENUM_0_VALUE_1;
deferred.resolve(extendedEnumerationOut, enumerationOut);
return new Promise<MethodWithMultipleEnumParametersDeferred>(deferred);
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection in project joynr by bmwcarit.
the class IltProviderBean method methodToFireBroadcastWithFiltering.
/*
* methodToFireBroadcastWithFiltering
*/
@Override
public void methodToFireBroadcastWithFiltering(String stringArg) {
logger.warn("*******************************************************");
logger.warn("* IltProvider.methodToFireBroadcastWithFiltering called");
logger.warn("*******************************************************");
// take the stringArg as input for the filtering
String stringOut = stringArg;
String[] stringArrayOut = IltUtil.createStringArray();
ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
StructWithStringArray structWithStringArrayOut = IltUtil.createStructWithStringArray();
StructWithStringArray[] structWithStringArrayArrayOut = IltUtil.createStructWithStringArrayArray();
// TODO
// fireBroadcastWithFiltering(stringOut,
// stringArrayOut,
// enumerationOut,
// structWithStringArrayOut,
// structWithStringArrayArrayOut);
}
use of joynr.interlanguagetest.namedTypeCollection2.ExtendedTypeCollectionEnumerationInTypeCollection in project joynr by bmwcarit.
the class IltProviderBean method methodToFireBroadcastWithSingleEnumerationParameter.
/*
* methodToFireBroadcastWithSingleEnumerationParameter
*/
@Override
public void methodToFireBroadcastWithSingleEnumerationParameter() {
logger.warn("************************************************************************");
logger.warn("* IltProvider.methodToFireBroadcastWithSingleEnumerationParameter called");
logger.warn("************************************************************************");
ExtendedTypeCollectionEnumerationInTypeCollection enumerationOut = ExtendedTypeCollectionEnumerationInTypeCollection.ENUM_2_VALUE_EXTENSION_FOR_TYPECOLLECTION;
// TODO
// fireBroadcastWithSingleEnumerationParameter(enumerationOut);
}
Aggregations