Changeset 1752 for trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe
- Timestamp:
- 09/18/14 09:58:15 (10 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.