Changeset 1898 for trunk/autoquest-plugin-uml-test/src/test/java
- Timestamp:
- 03/06/15 09:18:02 (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
r1896 r1898 21 21 import java.util.List; 22 22 import java.util.Random; 23 import java.util.logging.Level; 23 24 24 25 import org.apache.commons.lang.SerializationUtils; … … 29 30 import org.eclipse.uml2.uml.UMLPackage; 30 31 import org.junit.After; 32 import org.junit.BeforeClass; 31 33 import org.junit.Test; 32 34 … … 40 42 import de.ugoe.cs.autoquest.usageprofiles.FirstOrderMarkovModel; 41 43 import de.ugoe.cs.autoquest.usageprofiles.IStochasticProcess; 44 import de.ugoe.cs.util.console.Console; 45 import de.ugoe.cs.util.console.TextConsole; 42 46 43 47 /** … … 52 56 private final static String OUTPUT_DIR = "target/tmp/test-outputs/"; 53 57 54 /** 55 * 56 */ 58 @BeforeClass 59 public static void setUpBeforeClass() throws Exception { 60 Console.getInstance().registerTraceListener(new TextConsole(Level.INFO)); 61 } 62 57 63 @After 58 64 public void tearDown() throws Exception { … … 181 187 Collection<List<Event>> httpSequences = parser.getSequences(); 182 188 183 184 189 Model model = 185 190 ModelUtils.loadModel(ClassLoader … … 197 202 } 198 203 199 ModelUtils.writeModelToFile(model, OUTPUT_DIR + "testCreateInteractionFromEventSequence_2_result.uml"); 200 204 ModelUtils.writeModelToFile(model, OUTPUT_DIR + "testCreateInteractionFromEventSequence_1_result.uml"); 201 205 } 202 206 … … 294 298 ModelUtils.writeModelToFile(model, OUTPUT_DIR + "testCreateScheduling_1_result.uml"); 295 299 } 300 301 @Test 302 public void testValidateModelWithLog_1() throws Exception { 303 HTTPLogParser parser = 304 new HTTPLogParser(new File(ClassLoader 305 .getSystemResource("testCreateInteractionFromEventSequence_1_properties.txt") 306 .getFile())); 307 parser 308 .parseFile(new File(ClassLoader 309 .getSystemResource("testCreateInteractionFromEventSequence_1_usagedata.log") 310 .getFile())); 311 Collection<List<Event>> httpSequences = parser.getSequences(); 312 313 314 Model model = 315 ModelUtils.loadModel(ClassLoader 316 .getSystemResourceAsStream("testCreateInteractionFromEventSequence_1_model.uml")); 317 318 UMLUtils.validateModelWithLog(httpSequences, model, null); 319 } 320 321 @Test 322 public void testValidateModelWithLog_2() throws Exception { 323 HTTPLogParser parser = 324 new HTTPLogParser(new File(ClassLoader 325 .getSystemResource("testCreateInteractionFromEventSequence_2_properties.txt") 326 .getFile())); 327 parser 328 .parseFile(new File(ClassLoader 329 .getSystemResource("testCreateInteractionFromEventSequence_2_usagedata.log") 330 .getFile())); 331 Collection<List<Event>> httpSequences = parser.getSequences(); 332 333 334 Model model = 335 ModelUtils.loadModel(ClassLoader 336 .getSystemResourceAsStream("testCreateInteractionFromEventSequence_2_model.uml")); 337 338 UMLUtils.validateModelWithLog(httpSequences, model, null); 339 } 340 341 @Test 342 public void testValidateModelWithLog_HL7_v2() throws Exception { 343 HTTPLogParser parser = 344 new HTTPLogParser(new File(ClassLoader 345 .getSystemResource("hl7_servicenamemap.txt") 346 .getFile())); 347 parser 348 .parseFile(new File(ClassLoader 349 .getSystemResource("testCreateInteractionFromEventSequence_1_usagedata.log") 350 .getFile())); 351 Collection<List<Event>> httpSequences = parser.getSequences(); 352 353 354 Model model = 355 ModelUtils.loadModel(ClassLoader 356 .getSystemResourceAsStream("hl7model_v2.uml")); 357 358 UMLUtils.validateModelWithLog(httpSequences, model, "IXSTestSuite_1"); 359 } 296 360 297 361 private void deleteFiles(File file) {
Note: See TracChangeset
for help on using the changeset viewer.