Changeset 1752 for trunk/autoquest-plugin-uml-test
- Timestamp:
- 09/18/14 09:58:15 (10 years ago)
- Location:
- trunk/autoquest-plugin-uml-test
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-uml-test/pom.xml
r1643 r1752 18 18 <connection>scm:svn:${autoquest-scm-trunk-dir}/${project.artifactId}</connection> 19 19 </scm> 20 21 <repositories> 22 <repository> 23 <id>autoquest-thirdparty-repo</id> 24 <url>https://trex.informatik.uni-goettingen.de/nexus/content/repositories/thirdparty</url> 25 </repository> 26 </repositories> 27 20 28 <properties> 21 29 <tested-artifactId>autoquest-plugin-uml</tested-artifactId> … … 33 41 <version>${project.parent.version}</version> 34 42 </dependency> 43 44 <dependency> 45 <groupId>org.eclipse.emf</groupId> 46 <artifactId>org.eclipse.emf.common</artifactId> 47 <version>2.9.2</version> 48 </dependency> 49 <dependency> 50 <groupId>org.eclipse.emf</groupId> 51 <artifactId>org.eclipse.emf.ecore</artifactId> 52 <version>2.9.2</version> 53 </dependency> 54 <dependency> 55 <groupId>org.eclipse.emf</groupId> 56 <artifactId>org.eclipse.emf.ecore.xmi</artifactId> 57 <version>2.9.1</version> 58 </dependency> 59 <dependency> 60 <groupId>org.eclipse.emf</groupId> 61 <artifactId>org.eclipse.emf.mapping.ecore2xml</artifactId> 62 <version>2.7.0</version> 63 </dependency> 64 65 <dependency> 66 <groupId>org.eclipse.uml2</groupId> 67 <artifactId>org.eclipse.uml2.common</artifactId> 68 <version>1.8.2</version> 69 </dependency> 70 <dependency> 71 <groupId>org.eclipse.uml2</groupId> 72 <artifactId>org.eclipse.uml2.types</artifactId> 73 <version>1.1.0</version> 74 </dependency> 75 <dependency> 76 <groupId>org.eclipse.uml2</groupId> 77 <artifactId>org.eclipse.uml2.uml</artifactId> 78 <version>4.1.2</version> 79 </dependency> 80 <dependency> 81 <groupId>org.eclipse.uml2</groupId> 82 <artifactId>org.eclipse.uml2.uml.profile.l2</artifactId> 83 <version>1.1.0</version> 84 </dependency> 85 <dependency> 86 <groupId>org.eclipse.uml2</groupId> 87 <artifactId>org.eclipse.uml2.uml.profile.l3</artifactId> 88 <version>1.1.0</version> 89 </dependency> 90 <dependency> 91 <groupId>org.eclipse.uml2</groupId> 92 <artifactId>org.eclipse.uml2.uml.resources</artifactId> 93 <version>4.1.0</version> 94 </dependency> 95 <dependency> 96 <groupId>org.eclipse.emf</groupId> 97 <artifactId>org.eclipse.emf.validation</artifactId> 98 <version>1.7.0</version> 99 </dependency> 100 <dependency> 101 <groupId>org.eclipse.equinox</groupId> 102 <artifactId>org.eclipse.equinox.common</artifactId> 103 <version>3.6.2</version> 104 </dependency> 105 <dependency> 106 <groupId>org.eclipse.equinox</groupId> 107 <artifactId>org.eclipse.equinox.registry</artifactId> 108 <version>3.5.3</version> 109 </dependency> 110 <dependency> 111 <groupId>org.eclipse.core</groupId> 112 <artifactId>org.eclipse.core.expressions</artifactId> 113 <version>3.4.5</version> 114 </dependency> 115 <dependency> 116 <groupId>org.eclipse.osgi</groupId> 117 <artifactId>org.eclipse.osgi</artifactId> 118 <version>3.9.1</version> 119 </dependency> 120 <dependency> 121 <groupId>eu.midas_project</groupId> 122 <artifactId>ConstraintValidator</artifactId> 123 <version>0.2</version> 124 </dependency> 35 125 </dependencies> 36 126 </project> -
trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java
r1651 r1752 27 27 import java.util.Random; 28 28 29 import org.eclipse.core.runtime.IStatus; 29 30 import org.eclipse.emf.common.util.URI; 30 31 import org.eclipse.emf.ecore.EPackage; … … 55 56 import de.ugoe.cs.autoquest.testgeneration.RandomWalkGenerator; 56 57 import de.ugoe.cs.autoquest.usageprofiles.FirstOrderMarkovModel; 58 import eu.midas.dsl.validation.util.ConstraintValidator; 57 59 58 60 /** … … 178 180 UMLUtils.createInteractionFromEventSequence(httpSequence, model, "testSequence"); 179 181 } 182 183 ConstraintValidator validator = new ConstraintValidator(); 184 IStatus validationStatus = validator.validate(model); 185 if (validationStatus.getSeverity() == IStatus.OK) { 186 System.out.println("success"); 187 } 188 else { 189 System.out.println("Errors during the model validation: "); 190 for (IStatus status : validationStatus.getChildren()) { 191 System.out.println("\t" + status.getMessage()); 192 } 193 } 194 180 195 writeModelToFile(model, OUTPUT_DIR + "testCreateInteractionFromEventSequence_1_result.uml"); 181 loadModelFromInputStream(new FileInputStream(OUTPUT_DIR + "testCreateInteractionFromEventSequence_1_result.uml")); 196 loadModelFromInputStream(new FileInputStream(OUTPUT_DIR + 197 "testCreateInteractionFromEventSequence_1_result.uml")); 182 198 } 183 199 … … 225 241 UMLPackage.Literals.INTERACTION, true); 226 242 double usageScore = UMLUtils.calculateUsageScore(interaction, usageProfile); 227 System.out.format("usage score %02d: %.2f \t %d\n", j+1, usageScore, lengths[j]);243 System.out.format("usage score %02d: %.2f \t %d\n", j + 1, usageScore, lengths[j]); 228 244 } 229 245 } -
trunk/autoquest-plugin-uml-test/src/test/resources/testCreateInteractionFromEventSequence_1_model.uml
r1643 r1752 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_ O3qgoAaaEeS7deEA7EQ5bQ" name="Model">3 <packageImport xmi:type="uml:PackageImport" xmi:id="_ O3qgoQaaEeS7deEA7EQ5bQ">2 <uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_I6KgoCRYEeS7ONCnthfEow" name="Model"> 3 <packageImport xmi:type="uml:PackageImport" xmi:id="_I6KgoSRYEeS7ONCnthfEow"> 4 4 <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> 5 5 </packageImport> 6 <packagedElement xmi:type="uml:Class" xmi:id="_Wh3rMBZcEeSVxMc4KdphRg" name="ixsmq"> 7 <ownedOperation xmi:type="uml:Operation" xmi:id="_noyI0BZcEeSVxMc4KdphRg" name="removeIdentity"/> 8 <ownedOperation xmi:type="uml:Operation" xmi:id="_ueUdQBZcEeSVxMc4KdphRg" name="registerEntityWithIdentity"/> 9 <ownedOperation xmi:type="uml:Operation" xmi:id="_wa1NQBZcEeSVxMc4KdphRg" name="createIdentityFromEntity"/> 10 <ownedOperation xmi:type="uml:Operation" xmi:id="_xt2UUBZcEeSVxMc4KdphRg" name="updateEntityTraitValues"/> 11 <ownedOperation xmi:type="uml:Operation" xmi:id="_zPftQBZcEeSVxMc4KdphRg" name="getEntityTraitValues"/> 12 <ownedOperation xmi:type="uml:Operation" xmi:id="_2z7dUBZcEeSVxMc4KdphRg" name="findEntitiesByTraits"/> 13 <ownedOperation xmi:type="uml:Operation" xmi:id="_4U0BQBZcEeSVxMc4KdphRg" name="listLinkedEntities"/> 14 <ownedOperation xmi:type="uml:Operation" xmi:id="_6TAMQBZcEeSVxMc4KdphRg" name="listUnlinkedEntities"/> 6 <packagedElement xmi:type="uml:Interface" xmi:id="_OdlF4CRYEeS7ONCnthfEow" name="rlus"> 7 <ownedOperation xmi:type="uml:Operation" xmi:id="_Wp5AACRYEeS7ONCnthfEow" name="get"/> 8 <ownedOperation xmi:type="uml:Operation" xmi:id="_Xo0tcCRYEeS7ONCnthfEow" name="put"/> 9 <ownedOperation xmi:type="uml:Operation" xmi:id="_YPSQgCRYEeS7ONCnthfEow" name="list"/> 10 <ownedOperation xmi:type="uml:Operation" xmi:id="_eNhJgCRYEeS7ONCnthfEow" name="discard"/> 11 <ownedOperation xmi:type="uml:Operation" xmi:id="_f7d5ECRYEeS7ONCnthfEow" name="locate"/> 12 <ownedOperation xmi:type="uml:Operation" xmi:id="_gwVEgCRYEeS7ONCnthfEow" name="initialize"/> 13 <ownedOperation xmi:type="uml:Operation" xmi:id="_3Xe3kCRYEeS7ONCnthfEow" name="describe"/> 15 14 </packagedElement> 16 <packagedElement xmi:type="uml:Class" xmi:id="_9LnYIBZcEeSVxMc4KdphRg" name="rlus"> 17 <ownedOperation xmi:type="uml:Operation" xmi:id="_m-fZMBZdEeSVxMc4KdphRg" name="get"/> 18 <ownedOperation xmi:type="uml:Operation" xmi:id="_nonUQBZdEeSVxMc4KdphRg" name="list"/> 19 <ownedOperation xmi:type="uml:Operation" xmi:id="_obRgQBZdEeSVxMc4KdphRg" name="put"/> 20 <ownedOperation xmi:type="uml:Operation" xmi:id="_ppx6wBZdEeSVxMc4KdphRg" name="discard"/> 21 <ownedOperation xmi:type="uml:Operation" xmi:id="_qTNSQBZdEeSVxMc4KdphRg" name="locate"/> 22 <ownedOperation xmi:type="uml:Operation" xmi:id="_q7CuUBZdEeSVxMc4KdphRg" name="initialize"/> 23 <ownedOperation xmi:type="uml:Operation" xmi:id="_rzk40BZdEeSVxMc4KdphRg" name="describe"/> 15 <packagedElement xmi:type="uml:Interface" xmi:id="_-9-H0CRYEeS7ONCnthfEow" name="ixsmq"> 16 <ownedOperation xmi:type="uml:Operation" xmi:id="_djsT8CRZEeS7ONCnthfEow" name="removeIdentity"/> 17 <ownedOperation xmi:type="uml:Operation" xmi:id="_fmAxACRZEeS7ONCnthfEow" name="registerEntityWithIdentity"/> 18 <ownedOperation xmi:type="uml:Operation" xmi:id="_hgAYgCRZEeS7ONCnthfEow" name="createIdentityFromEntity"/> 19 <ownedOperation xmi:type="uml:Operation" xmi:id="_lERwgCRZEeS7ONCnthfEow" name="updateEntityTraitValues"/> 20 <ownedOperation xmi:type="uml:Operation" xmi:id="_oWGGkCRZEeS7ONCnthfEow" name="getEntityTraitValues"/> 21 <ownedOperation xmi:type="uml:Operation" xmi:id="_CgldgCRaEeS7ONCnthfEow" name="findIdentitiesByTraits"/> 22 <ownedOperation xmi:type="uml:Operation" xmi:id="_IYzOECRaEeS7ONCnthfEow" name="listedLinkedEntities"/> 23 <ownedOperation xmi:type="uml:Operation" xmi:id="_K8rgECRaEeS7ONCnthfEow" name="listedUnlinkedEntities"/> 24 24 </packagedElement> 25 <packagedElement xmi:type="uml:C lass" xmi:id="_QK3v0Bb_EeSVxMc4KdphRg" name="user">26 <ownedAttribute xmi:type="uml:Property" xmi:id="_ TB2kABb_EeSVxMc4KdphRg" name="rlus" type="_9LnYIBZcEeSVxMc4KdphRg" association="_TB4ZMBb_EeSVxMc4KdphRg">27 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ TB2kARb_EeSVxMc4KdphRg" value="1"/>28 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ TB2kAhb_EeSVxMc4KdphRg" value="1"/>25 <packagedElement xmi:type="uml:Component" xmi:id="_MBWsUCReEeS7ONCnthfEow" name="TestContext"> 26 <ownedAttribute xmi:type="uml:Property" xmi:id="_e_S9ACReEeS7ONCnthfEow" name="rlus_property" visibility="public" type="_vFOpUCRfEeS7ONCnthfEow"> 27 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_fXwgUCReEeS7ONCnthfEow" value="1"/> 28 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_fXxHYCReEeS7ONCnthfEow" value="1"/> 29 29 </ownedAttribute> 30 <ownedAttribute xmi:type="uml:Property" xmi:id="_UH_ssBb_EeSVxMc4KdphRg" name="ixsmq" type="_Wh3rMBZcEeSVxMc4KdphRg" association="_UIA60Bb_EeSVxMc4KdphRg"> 31 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_UIATwBb_EeSVxMc4KdphRg" value="1"/> 32 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_UIATwRb_EeSVxMc4KdphRg" value="1"/> 30 <ownedAttribute xmi:type="uml:Property" xmi:id="_mwuR8CReEeS7ONCnthfEow" name="ixsmq_property" visibility="public" type="_w3q3UCRfEeS7ONCnthfEow"> 31 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_nLN1kCReEeS7ONCnthfEow" value="1"/> 32 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_nLOcoCReEeS7ONCnthfEow" value="1"/> 33 </ownedAttribute> 34 <ownedAttribute xmi:type="uml:Property" xmi:id="_IBEI4CRtEeS7ONCnthfEow" name="user" type="_E5BZ4CRtEeS7ONCnthfEow"/> 35 <ownedConnector xmi:type="uml:Connector" xmi:id="_Mkge4CRtEeS7ONCnthfEow" name="Connector1"> 36 <end xmi:type="uml:ConnectorEnd" xmi:id="_Mkge4SRtEeS7ONCnthfEow" partWithPort="_e_S9ACReEeS7ONCnthfEow" role="_9zoXcCRfEeS7ONCnthfEow"> 37 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Mkge4iRtEeS7ONCnthfEow" value="1"/> 38 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Mkge4yRtEeS7ONCnthfEow" value="1"/> 39 </end> 40 <end xmi:type="uml:ConnectorEnd" xmi:id="_MkhF8CRtEeS7ONCnthfEow" partWithPort="_IBEI4CRtEeS7ONCnthfEow" role="_I39UoCRtEeS7ONCnthfEow"> 41 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_MkhF8SRtEeS7ONCnthfEow" value="1"/> 42 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_MkhF8iRtEeS7ONCnthfEow" value="1"/> 43 </end> 44 </ownedConnector> 45 <ownedConnector xmi:type="uml:Connector" xmi:id="_oqbnwCRtEeS7ONCnthfEow" name="Connector2"> 46 <end xmi:type="uml:ConnectorEnd" xmi:id="_oqbnwSRtEeS7ONCnthfEow" partWithPort="_mwuR8CReEeS7ONCnthfEow" role="_CqD64CRgEeS7ONCnthfEow"> 47 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_oqbnwiRtEeS7ONCnthfEow" value="1"/> 48 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_oqbnwyRtEeS7ONCnthfEow" value="1"/> 49 </end> 50 <end xmi:type="uml:ConnectorEnd" xmi:id="_oqcO0CRtEeS7ONCnthfEow" partWithPort="_IBEI4CRtEeS7ONCnthfEow" role="_lgPjsCRtEeS7ONCnthfEow"> 51 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_oqcO0SRtEeS7ONCnthfEow" value="1"/> 52 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_oqcO0iRtEeS7ONCnthfEow" value="1"/> 53 </end> 54 </ownedConnector> 55 </packagedElement> 56 <packagedElement xmi:type="uml:Component" xmi:id="_vFOpUCRfEeS7ONCnthfEow" name="rlus"> 57 <ownedAttribute xmi:type="uml:Port" xmi:id="_9zoXcCRfEeS7ONCnthfEow" name="p_rlus" visibility="public" type="_LP9HwCRiEeS7ONCnthfEow" aggregation="composite"> 58 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_-F3-ACRfEeS7ONCnthfEow" value="1"/> 59 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_-F4lECRfEeS7ONCnthfEow" value="1"/> 60 </ownedAttribute> 61 <nestedClassifier xmi:type="uml:Component" xmi:id="_LP9HwCRiEeS7ONCnthfEow" clientDependency="_3Fl_4CRkEeS7ONCnthfEow" name="p_rlus_PortConfiguration"> 62 <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_3Fl_4CRkEeS7ONCnthfEow" name="realization" client="_LP9HwCRiEeS7ONCnthfEow" supplier="_OdlF4CRYEeS7ONCnthfEow" contract="_OdlF4CRYEeS7ONCnthfEow"/> 63 </nestedClassifier> 64 </packagedElement> 65 <packagedElement xmi:type="uml:Component" xmi:id="_w3q3UCRfEeS7ONCnthfEow" name="ixsmq"> 66 <ownedAttribute xmi:type="uml:Port" xmi:id="_CqD64CRgEeS7ONCnthfEow" name="p_ixsmq" visibility="public" type="_Rjka4CRiEeS7ONCnthfEow" aggregation="composite"> 67 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_C9P8oCRgEeS7ONCnthfEow" value="1"/> 68 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_C9RKwCRgEeS7ONCnthfEow" value="1"/> 69 </ownedAttribute> 70 <nestedClassifier xmi:type="uml:Component" xmi:id="_Rjka4CRiEeS7ONCnthfEow" clientDependency="_E-V4YCRlEeS7ONCnthfEow" name="p_ixsmq_PortConfiguration"> 71 <interfaceRealization xmi:type="uml:InterfaceRealization" xmi:id="_E-V4YCRlEeS7ONCnthfEow" name="realization" client="_Rjka4CRiEeS7ONCnthfEow" supplier="_-9-H0CRYEeS7ONCnthfEow" contract="_-9-H0CRYEeS7ONCnthfEow"/> 72 </nestedClassifier> 73 </packagedElement> 74 <packagedElement xmi:type="uml:Component" xmi:id="_E5BZ4CRtEeS7ONCnthfEow" name="User"> 75 <ownedAttribute xmi:type="uml:Port" xmi:id="_I39UoCRtEeS7ONCnthfEow" name="p_user_rlus" visibility="public" type="_LP9HwCRiEeS7ONCnthfEow" aggregation="composite" isConjugated="true"> 76 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_JDqOUCRtEeS7ONCnthfEow" value="1"/> 77 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_JDq1YCRtEeS7ONCnthfEow" value="1"/> 78 </ownedAttribute> 79 <ownedAttribute xmi:type="uml:Port" xmi:id="_lgPjsCRtEeS7ONCnthfEow" name="r_user_isxmq" visibility="public" type="_Rjka4CRiEeS7ONCnthfEow" aggregation="composite" isConjugated="true"> 80 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_l1ASwCRtEeS7ONCnthfEow" value="1"/> 81 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_l1Bg4CRtEeS7ONCnthfEow" value="1"/> 33 82 </ownedAttribute> 34 83 </packagedElement> 35 <packagedElement xmi:type="uml:Association" xmi:id="_TB4ZMBb_EeSVxMc4KdphRg" name="user_rlus" memberEnd="_TB4ZMRb_EeSVxMc4KdphRg _TB2kABb_EeSVxMc4KdphRg"> 36 <ownedEnd xmi:type="uml:Property" xmi:id="_TB4ZMRb_EeSVxMc4KdphRg" name="user" type="_QK3v0Bb_EeSVxMc4KdphRg" association="_TB4ZMBb_EeSVxMc4KdphRg"> 37 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_TB4ZMhb_EeSVxMc4KdphRg" value="1"/> 38 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_TB4ZMxb_EeSVxMc4KdphRg" value="1"/> 39 </ownedEnd> 40 </packagedElement> 41 <packagedElement xmi:type="uml:Association" xmi:id="_UIA60Bb_EeSVxMc4KdphRg" name="user_ixsmq" memberEnd="_UIA60Rb_EeSVxMc4KdphRg _UH_ssBb_EeSVxMc4KdphRg"> 42 <ownedEnd xmi:type="uml:Property" xmi:id="_UIA60Rb_EeSVxMc4KdphRg" name="user" type="_QK3v0Bb_EeSVxMc4KdphRg" association="_UIA60Bb_EeSVxMc4KdphRg"> 43 <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_UIA60hb_EeSVxMc4KdphRg" value="1"/> 44 <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_UIA60xb_EeSVxMc4KdphRg" value="1"/> 45 </ownedEnd> 84 <packagedElement xmi:type="uml:Interaction" xmi:id="_fH4hMCRyEeS7ONCnthfEow" name="Interaction1"> 85 <lifeline xmi:type="uml:Lifeline" xmi:id="_g20vQCRyEeS7ONCnthfEow" name="Lifeline" represents="_9zoXcCRfEeS7ONCnthfEow"/> 46 86 </packagedElement> 47 87 </uml:Model>
Note: See TracChangeset
for help on using the changeset viewer.