summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-08-27 07:35:08 (EDT)
committerStephan Born2012-09-10 08:46:39 (EDT)
commitdb74c235ab10a34072707e189e3dd86427fcc511 (patch)
tree93a946477228d12906307a626b81cde7a9166e35
parentfcf8f6dd9e11f42b7d6ad52c81c69322dd042f93 (diff)
downloadorg.eclipse.stardust.ide-db74c235ab10a34072707e189e3dd86427fcc511.zip
org.eclipse.stardust.ide-db74c235ab10a34072707e189e3dd86427fcc511.tar.gz
org.eclipse.stardust.ide-db74c235ab10a34072707e189e3dd86427fcc511.tar.bz2
CRNT-25760 Refactor/Clean up MB Facade: Scetched Processinterface Creation
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@58705 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java142
-rw-r--r--model/org.eclipse.stardust.model.xpdl.builder/src/test/java/org/eclipse/stardust/model/xpdl/builder/CrossModelSupportModelBuilderTest.java172
2 files changed, 280 insertions, 34 deletions
diff --git a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
index bd28668..2bd6eee 100644
--- a/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
+++ b/model/org.eclipse.stardust.model.xpdl.builder/src/main/java/org/eclipse/stardust/model/xpdl/builder/utils/ModelBuilderFacade.java
@@ -24,6 +24,7 @@ import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newStructV
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newSubProcessActivity;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.util.EList;
@@ -45,6 +46,7 @@ import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationContextTypeType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationTypeType;
+import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
import org.eclipse.stardust.model.xpdl.carnot.ConditionalPerformerType;
import org.eclipse.stardust.model.xpdl.carnot.DataMappingConnectionType;
import org.eclipse.stardust.model.xpdl.carnot.DataPathType;
@@ -56,6 +58,7 @@ import org.eclipse.stardust.model.xpdl.carnot.DiagramType;
import org.eclipse.stardust.model.xpdl.carnot.EndEventSymbol;
import org.eclipse.stardust.model.xpdl.carnot.IIdentifiableModelElement;
import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
+import org.eclipse.stardust.model.xpdl.carnot.IdRef;
import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
import org.eclipse.stardust.model.xpdl.carnot.OrganizationType;
@@ -66,11 +69,22 @@ import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
import org.eclipse.stardust.model.xpdl.carnot.RoleType;
import org.eclipse.stardust.model.xpdl.carnot.StartEventSymbol;
import org.eclipse.stardust.model.xpdl.carnot.TransitionConnectionType;
+import org.eclipse.stardust.model.xpdl.carnot.extensions.ExtensionsFactory;
+import org.eclipse.stardust.model.xpdl.carnot.extensions.FormalParameterMappingsType;
+import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
import org.eclipse.stardust.model.xpdl.carnot.util.CarnotConstants;
import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
+import org.eclipse.stardust.model.xpdl.xpdl2.BasicTypeType;
+import org.eclipse.stardust.model.xpdl.xpdl2.DeclaredTypeType;
+import org.eclipse.stardust.model.xpdl.xpdl2.ExternalPackage;
+import org.eclipse.stardust.model.xpdl.xpdl2.FormalParameterType;
+import org.eclipse.stardust.model.xpdl.xpdl2.FormalParametersType;
+import org.eclipse.stardust.model.xpdl.xpdl2.ModeType;
import org.eclipse.stardust.model.xpdl.xpdl2.SchemaTypeType;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationType;
+import org.eclipse.stardust.model.xpdl.xpdl2.TypeType;
import org.eclipse.stardust.model.xpdl.xpdl2.XpdlFactory;
+import org.eclipse.stardust.model.xpdl.xpdl2.XpdlPackage;
import org.eclipse.stardust.model.xpdl.xpdl2.util.TypeDeclarationUtils;
import org.eclipse.stardust.modeling.repository.common.descriptors.ReplaceModelElementDescriptor;
import org.eclipse.xsd.XSDComplexTypeDefinition;
@@ -215,6 +229,134 @@ public class ModelBuilderFacade
return structuredDataType;
}
+ public void createPrimitiveParameter(ProcessDefinitionType processInterface,
+ DataType dataType, String id, String name, ModeType mode)
+ {
+ XpdlFactory xpdlFactory = XpdlPackage.eINSTANCE.getXpdlFactory();
+ FormalParameterType parameterType = xpdlFactory.createFormalParameterType();
+ parameterType.setId(id);
+ parameterType.setName(name);
+ parameterType.setMode(mode);
+
+ org.eclipse.stardust.model.xpdl.xpdl2.DataTypeType dataTypeType = XpdlFactory.eINSTANCE
+ .createDataTypeType();
+ BasicTypeType basicType = xpdlFactory.createBasicTypeType();
+ basicType.setType(TypeType.STRING_LITERAL);
+ dataTypeType.setBasicType(basicType);
+ parameterType.setDataType(dataTypeType);
+ String typeId = dataType.getType().getId();
+ dataTypeType.setCarnotType(typeId);
+
+ FormalParametersType parametersType = processInterface.getFormalParameters();
+
+ if (parametersType == null)
+ {
+ parametersType = xpdlFactory.createFormalParametersType();
+ }
+
+ parametersType.addFormalParameter(parameterType);
+ processInterface.setFormalParameters(parametersType);
+
+ FormalParameterMappingsType parameterMappingsType = processInterface
+ .getFormalParameterMappings();
+
+ if (parameterMappingsType == null)
+ {
+ parameterMappingsType = ExtensionsFactory.eINSTANCE
+ .createFormalParameterMappingsType();
+ }
+
+ parameterMappingsType.setMappedData(parameterType, dataType);
+ processInterface.setFormalParameterMappings(parameterMappingsType);
+ }
+
+ public void createStructuredParameter(ProcessDefinitionType processInterface,
+ DataType dataType, String id, String name, ModeType mode)
+ {
+ XpdlFactory xpdlFactory = XpdlPackage.eINSTANCE.getXpdlFactory();
+ FormalParameterType parameterType = xpdlFactory.createFormalParameterType();
+
+ parameterType.setId(id);
+ parameterType.setName(name);
+ parameterType.setMode(mode);
+
+ org.eclipse.stardust.model.xpdl.xpdl2.DataTypeType dataTypeType = xpdlFactory
+ .createDataTypeType();
+ String typeId = dataType.getType().getId();
+
+ parameterType.setDataType(dataTypeType);
+ dataTypeType.setCarnotType(typeId);
+
+ DeclaredTypeType declaredType = xpdlFactory.createDeclaredTypeType();
+ declaredType.setId(AttributeUtil.getAttributeValue(dataType,
+ StructuredDataConstants.TYPE_DECLARATION_ATT));
+
+ dataTypeType.setDeclaredType(declaredType);
+
+ FormalParametersType parametersType = processInterface.getFormalParameters();
+
+ if (parametersType == null)
+ {
+ parametersType = xpdlFactory.createFormalParametersType();
+ }
+ parametersType.addFormalParameter(parameterType);
+ processInterface.setFormalParameters(parametersType);
+
+ FormalParameterMappingsType parameterMappingsType = processInterface
+ .getFormalParameterMappings();
+
+ if (parameterMappingsType == null)
+ {
+ parameterMappingsType = ExtensionsFactory.eINSTANCE
+ .createFormalParameterMappingsType();
+ }
+
+ parameterMappingsType.setMappedData(parameterType, dataType);
+ processInterface.setFormalParameterMappings(parameterMappingsType);
+ }
+
+ public void setProcessImplementation(ProcessDefinitionType processInterface,
+ ProcessDefinitionType processImplementation)
+ {
+ ModelType interfaceModel = ModelUtils.findContainingModel(processInterface);
+ ModelType implementationModel = ModelUtils
+ .findContainingModel(processImplementation);
+ ExternalPackage packageRef = implementationModel.getExternalPackages()
+ .getExternalPackage(interfaceModel.getId());
+
+ IdRef idRef = CarnotWorkflowModelFactory.eINSTANCE.createIdRef();
+ idRef.setRef(processInterface.getId());
+ idRef.setPackageRef(packageRef);
+ processImplementation.setExternalRef(idRef);
+
+ FormalParameterMappingsType parameterMappings = ExtensionsFactory.eINSTANCE
+ .createFormalParameterMappingsType();
+ FormalParametersType referencedParametersType = processInterface
+ .getFormalParameters();
+ FormalParametersType formalParameters = XpdlFactory.eINSTANCE
+ .createFormalParametersType();
+ for (Iterator<FormalParameterType> i = referencedParametersType
+ .getFormalParameter().iterator(); i.hasNext();)
+ {
+ FormalParameterType referencedParameterType = i.next();
+ FormalParameterType parameterType = ModelUtils.cloneFormalParameterType(
+ referencedParameterType, null);
+ formalParameters.addFormalParameter(parameterType);
+ parameterMappings.setMappedData(parameterType, null);
+ }
+ processImplementation.setFormalParameters(formalParameters);
+ processImplementation.setFormalParameterMappings(parameterMappings);
+ }
+
+ public void setFormalParameter(ProcessDefinitionType implementingProcess,
+ String parameterID, DataType dataType)
+ {
+ FormalParameterType formalParameterType = implementingProcess.getFormalParameters()
+ .getFormalParameter(parameterID);
+ implementingProcess.getFormalParameterMappings().setMappedData(formalParameterType,
+ dataType);
+ }
+
/**
* Created a data of type <b>Document</b>.
*
diff --git a/model/org.eclipse.stardust.model.xpdl.builder/src/test/java/org/eclipse/stardust/model/xpdl/builder/CrossModelSupportModelBuilderTest.java b/model/org.eclipse.stardust.model.xpdl.builder/src/test/java/org/eclipse/stardust/model/xpdl/builder/CrossModelSupportModelBuilderTest.java
index e92a3a9..2ca4c2f 100644
--- a/model/org.eclipse.stardust.model.xpdl.builder/src/test/java/org/eclipse/stardust/model/xpdl/builder/CrossModelSupportModelBuilderTest.java
+++ b/model/org.eclipse.stardust.model.xpdl.builder/src/test/java/org/eclipse/stardust/model/xpdl/builder/CrossModelSupportModelBuilderTest.java
@@ -16,20 +16,44 @@ import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.junit.Assert.assertThat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.stardust.engine.core.pojo.data.Type;
+import org.eclipse.stardust.engine.core.struct.StructuredDataConstants;
import org.eclipse.stardust.model.xpdl.builder.strategy.InMemoryModelManagementStrategy;
import org.eclipse.stardust.model.xpdl.builder.utils.ModelBuilderFacade;
import org.eclipse.stardust.model.xpdl.builder.utils.ModelerConstants;
import org.eclipse.stardust.model.xpdl.builder.utils.XpdlModelIoUtils;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.ApplicationType;
+import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
import org.eclipse.stardust.model.xpdl.carnot.DataType;
import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
+import org.eclipse.stardust.model.xpdl.carnot.IdRef;
import org.eclipse.stardust.model.xpdl.carnot.LaneSymbol;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.extensions.ExtensionsFactory;
+import org.eclipse.stardust.model.xpdl.carnot.extensions.FormalParameterMappingType;
+import org.eclipse.stardust.model.xpdl.carnot.extensions.FormalParameterMappingsType;
+import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
+import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
+import org.eclipse.stardust.model.xpdl.xpdl2.BasicTypeType;
+import org.eclipse.stardust.model.xpdl.xpdl2.DataTypeType;
+import org.eclipse.stardust.model.xpdl.xpdl2.DeclaredTypeType;
import org.eclipse.stardust.model.xpdl.xpdl2.ExternalPackage;
import org.eclipse.stardust.model.xpdl.xpdl2.ExternalPackages;
+import org.eclipse.stardust.model.xpdl.xpdl2.ExternalReferenceType;
+import org.eclipse.stardust.model.xpdl.xpdl2.FormalParameterType;
+import org.eclipse.stardust.model.xpdl.xpdl2.FormalParametersType;
+import org.eclipse.stardust.model.xpdl.xpdl2.ModeType;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationType;
+import org.eclipse.stardust.model.xpdl.xpdl2.TypeType;
+import org.eclipse.stardust.model.xpdl.xpdl2.XpdlFactory;
+import org.eclipse.stardust.model.xpdl.xpdl2.XpdlPackage;
import org.junit.Before;
import org.junit.Test;
@@ -39,73 +63,153 @@ public class CrossModelSupportModelBuilderTest
private InMemoryModelManagementStrategy strategy;
private DataType searchedDataType1;
private DataType searchedDataType2;
-
+
private ApplicationType searchedApplicationType;
private ProcessDefinitionType searchedProcess;
private TypeDeclarationType searchedType;
- private IModelParticipant searchedRole;
+ private IModelParticipant searchedRole;
+
+ private static final Type[] TYPES = {
+ Type.Calendar, Type.String, Type.Timestamp, Type.Boolean, Type.Byte, Type.Char,
+ Type.Double, Type.Float, Type.Integer, Type.Long, Type.Short};
+
+ List<Type> primitiveTypes = Arrays.asList(TYPES);
+
+ List<Object> dataTypes = new ArrayList<Object>();
+ private DataType localPrimitive;
+ private DataType localComposite;
+ private DataType implementingComposite;
+
+ private static final int[] elementFeatureIds = {
+ XpdlPackage.FORMAL_PARAMETER_TYPE__ID, XpdlPackage.FORMAL_PARAMETER_TYPE__NAME,
+ XpdlPackage.FORMAL_PARAMETER_TYPE__MODE};
@Before
public void initCrossModeling()
{
strategy = new InMemoryModelManagementStrategy();
-
+
ModelBuilderFacade facade = new ModelBuilderFacade(strategy);
ModelType providerModel = newBpmModel().withName("ProviderModel").build();
ModelType consumerModel = newBpmModel().withName("ConsumerModel").build();
strategy.loadModels().add(consumerModel);
strategy.loadModels().add(providerModel);
-
+
//Participants
facade.createRole(providerModel, "Administrator", "Administrator");
facade.createRole(consumerModel, "Administrator", "Administrator");
-
+
//Primitive Data
- facade.createPrimitiveData(providerModel, "ProvidedPrimitive", "ProvidedPrimitive", ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
-
- //Type Declaration
+ localPrimitive = facade.createPrimitiveData(providerModel, "ProvidedPrimitive", "ProvidedPrimitive", ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
+ DataType implementingPrimitive = facade.createPrimitiveData(consumerModel, "ImplementingPrimitive", "ImplementingPrimitive", ModelerConstants.STRING_PRIMITIVE_DATA_TYPE);
+
+
+ //Type Declaration
facade.createTypeDeclaration(providerModel, "ProvidedComposite", "ProvidedComposite");
-
+
//Processes
ProcessDefinitionType providedProcess = facade.createProcess(providerModel, "ProvidedProcess", "ProvidedProcess");
- ProcessDefinitionType providedProcess2 = facade.createProcess(providerModel, "ProvidedProcess2", "ProvidedProcess2");
+ ProcessDefinitionType providedProcess2 = facade.createProcess(providerModel, "ProvidedProcess2", "ProvidedProcess2");
+ ProcessDefinitionType processInterface = facade.createProcess(providerModel, "ProcessInterface", "ProcessInterface");
ProcessDefinitionType consumerProcess = facade.createProcess(consumerModel, "ConsumerProcess", "ConsumerProcess");
-
-
+ ProcessDefinitionType implementingProcess = facade.createProcess(consumerModel, "ImplementingProcess", "ImplementingProcess");
+
//Structured Data / Document Data
- DataType localComposite = facade.createStructuredData(providerModel, "LocalComposite1", "LocalComposite1", "ProviderModel:ProvidedComposite");
- facade.createStructuredData(consumerModel, "ProvidedComposite1", "ProvidedComposite1", "ProviderModel:ProvidedComposite");
+ localComposite = facade.createStructuredData(providerModel, "LocalComposite1", "LocalComposite1", "ProviderModel:ProvidedComposite");
+ implementingComposite = facade.createStructuredData(consumerModel, "ProvidedComposite1", "ProvidedComposite1", "ProviderModel:ProvidedComposite");
facade.createDocumentData(providerModel, "LocalDocument", "LocalDocument", "ProvidedComposite");
-
- //Applications
+
+ //Process Interface (Creation)
+ facade.createPrimitiveParameter(processInterface, localPrimitive, "FormalParameter1", "FormalParameter1", ModeType.IN);
+ facade.createStructuredParameter(processInterface, localComposite, "FormalParameter2", "FormalParameter2", ModeType.IN);
+
+ //Process Interface (Usage)
+ facade.setProcessImplementation(processInterface, implementingProcess);
+ facade.setFormalParameter(implementingProcess, "FormalParameter1", implementingPrimitive);
+ facade.setFormalParameter(implementingProcess, "FormalParameter2", implementingComposite);
+
+ //Applications
facade.createApplication(providerModel, "WebService", "WebService", ModelerConstants.WEB_SERVICE_APPLICATION_TYPE_ID);
facade.createApplication(providerModel, "Message Transformation", "Message Transformation", ModelerConstants.MESSAGE_TRANSFORMATION_APPLICATION_TYPE_ID);
-
- //Activities
- ActivityType activity1 = facade.createActivity(providerModel, providedProcess2, "Manual", "ManualActivity1", "ManualActivity1", "ProviderModel:Administrator", null, null);
- facade.createActivity(providerModel, providedProcess2, "Application", "AppActivity1", "AppActivity1", null, "ProviderModel:WebService", null);
+
+ //Activities
+ ActivityType activity1 = facade.createActivity(providerModel, providedProcess2, "Manual", "ManualActivity1", "ManualActivity1", "ProviderModel:Administrator", null, null);
+ facade.createActivity(providerModel, providedProcess2, "Application", "AppActivity1", "AppActivity1", null, "ProviderModel:WebService", null);
facade.createActivity(consumerModel, consumerProcess, "Subprocess", "ProvidedProcess1", "ProvidedProcess1", null, null, "ProviderModel:ProvidedProcess");
-
+
//Symbols
LaneSymbol laneSymbol = facade.findLaneSymbolById(providedProcess2, "DefaultLane");
facade.createActivitySymbol(providerModel, activity1, providedProcess2, laneSymbol.getId(), 40, 40, 180, 50);
facade.createDataSymbol(providerModel, localComposite, providedProcess2, laneSymbol.getId(), 100, 100, 40, 80);
-
+
//Search & Find
searchedDataType1 = facade.findData("ProviderModel:ProvidedPrimitive");
- searchedDataType2 = facade.findData(providerModel, "ProvidedPrimitive");
- searchedApplicationType = facade.findApplication("ProviderModel:WebService");
+ searchedDataType2 = facade.findData(providerModel, "ProvidedPrimitive");
+ searchedApplicationType = facade.findApplication("ProviderModel:WebService");
searchedProcess = facade.findProcessDefinition("ProviderModel:ProvidedProcess2");
searchedType = facade.findTypeDeclaration("ProviderModel:ProvidedComposite");
searchedRole = facade.findParticipant("ProviderModel:Administrator");
-
-
+
+
//Store
- byte[] modelContent = XpdlModelIoUtils.saveModel(providerModel);
-
+ byte[] modelContent = XpdlModelIoUtils.saveModel(consumerModel);
+
//Output
System.out.println(new String(modelContent));
+ }
+
+ private void createPrimitiveParameter(ProcessDefinitionType processInterface)
+ {
+ XpdlFactory xpdlFactory = XpdlPackage.eINSTANCE.getXpdlFactory();
+ FormalParameterType parameterType = xpdlFactory.createFormalParameterType();
+ parameterType.setId("FormalParameter1");
+ parameterType.setName("Formal Parameter 1");
+ parameterType.setMode(ModeType.IN);
+
+ DataTypeType dataTypeType = xpdlFactory.createDataTypeType();
+ BasicTypeType basicType = xpdlFactory.createBasicTypeType();
+ basicType.setType(TypeType.STRING_LITERAL);
+ dataTypeType.setBasicType(basicType);
+ parameterType.setDataType(dataTypeType);
+ String typeId = localPrimitive.getType().getId();
+ dataTypeType.setCarnotType(typeId);
+
+ FormalParametersType parametersType = xpdlFactory.createFormalParametersType();
+ parametersType.addFormalParameter(parameterType);
+ processInterface.setFormalParameters(parametersType);
+
+ FormalParameterMappingsType parameterMappingsType = ExtensionsFactory.eINSTANCE.createFormalParameterMappingsType();
+ parameterMappingsType.setMappedData(parameterType, localPrimitive);
+ processInterface.setFormalParameterMappings(parameterMappingsType);
+ }
+
+ private void createStructuredParameter(ProcessDefinitionType processInterface)
+ {
+ XpdlFactory xpdlFactory = XpdlPackage.eINSTANCE.getXpdlFactory();
+ FormalParameterType parameterType = xpdlFactory.createFormalParameterType();
+ parameterType.setId("FormalParameter2");
+ parameterType.setName("Formal Parameter 2");
+ parameterType.setMode(ModeType.IN);
+
+ DataTypeType dataTypeType = xpdlFactory.createDataTypeType();
+ String typeId = localComposite.getType().getId();
+
+ parameterType.setDataType(dataTypeType);
+ dataTypeType.setCarnotType(typeId);
+
+ DeclaredTypeType declaredType = xpdlFactory.createDeclaredTypeType();
+ declaredType.setId(AttributeUtil.getAttributeValue(localComposite, StructuredDataConstants.TYPE_DECLARATION_ATT));
+
+ dataTypeType.setDeclaredType(declaredType);
+
+ FormalParametersType parametersType = processInterface.getFormalParameters();
+ parametersType.addFormalParameter(parameterType);
+ processInterface.setFormalParameters(parametersType);
+
+ FormalParameterMappingsType parameterMappingsType = processInterface.getFormalParameterMappings();
+ parameterMappingsType.setMappedData(parameterType, localComposite);
+ processInterface.setFormalParameterMappings(parameterMappingsType);
}
@Test
@@ -122,25 +226,25 @@ public class CrossModelSupportModelBuilderTest
assertThat(externalPackage.getId(), is("ProviderModel"));
assertThat(externalPackage.getName(), is("ProviderModel"));
}
-
+
@Test
public void verifySearchAndFind()
{
assertThat(searchedDataType1, not(is(nullValue())));
assertThat(searchedDataType1.getId(),is("ProvidedPrimitive"));
-
+
assertThat(searchedDataType2, not(is(nullValue())));
assertThat(searchedDataType2.getId(),is("ProvidedPrimitive"));
-
+
assertThat(searchedApplicationType, not(is(nullValue())));
assertThat(searchedApplicationType.getId(),is("WebService"));
-
+
assertThat(searchedProcess, not(is(nullValue())));
assertThat(searchedProcess.getId(),is("ProvidedProcess2"));
-
+
assertThat(searchedType, not(is(nullValue())));
assertThat(searchedType.getId(),is("ProvidedComposite"));
-
+
assertThat(searchedRole, not(is(nullValue())));
assertThat(searchedRole.getId(),is("Administrator"));