Changeset 1752 for trunk/autoquest-plugin-uml-test/src/test
- Timestamp:
- 09/18/14 09:58:15 (10 years ago)
- Location:
- trunk/autoquest-plugin-uml-test/src/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.