- Timestamp:
- 07/26/13 09:48:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-html-test/src/test/java/de/ugoe/cs/autoquest/plugin/html/HTMLLogParserTest.java
r1069 r1279 47 47 } 48 48 49 50 49 /** 51 50 * Tests the parseFile method with a given trace file. … … 53 52 */ 54 53 @Test 55 public void testParseFile () throws Exception {54 public void testParseFile_1() throws Exception { 56 55 HTMLLogParser parser = new HTMLLogParser(); 57 56 parser.parseFile(new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_1.xml").getFile())); 57 Collection<List<Event>> events = parser.getSequences(); 58 59 assertNotNull(events); 60 assertEquals(1, events.size()); 61 62 Iterator<List<Event>> iterator = events.iterator(); 63 assertNotNull(iterator); 64 assertEquals(1, iterator.next().size()); 65 assertFalse(iterator.hasNext()); 66 67 System.err.println("{"); 68 for (List<Event> session : events) { 69 System.err.println(" {"); 70 for (Event event : session) { 71 System.err.print(" "); 72 System.err.print(event); 73 System.err.println(","); 74 } 75 System.err.println(" }"); 76 } 77 System.err.println("}"); 78 System.err.println("\n\n"); 79 80 GUIModel guiModel = parser.getGuiModel(); 81 assertNotNull(guiModel); 82 83 for (IGUIElement root : guiModel.getRootElements()) { 84 dumpGUIElement(root, guiModel, ""); 85 } 86 } 87 88 /** 89 * Tests the parseFile method with a given trace file. 90 * @throws Exception 91 */ 92 @Test 93 public void testParseFile_2() throws Exception { 94 HTMLLogParser parser = new HTMLLogParser(); 58 95 parser.parseFile(new File(ClassLoader.getSystemResource("htmlmonitor_testtrace_2.xml").getFile())); 59 96 Collection<List<Event>> events = parser.getSequences(); 60 97 61 98 assertNotNull(events); 62 assertEquals( 2, events.size());99 assertEquals(1, events.size()); 63 100 64 101 Iterator<List<Event>> iterator = events.iterator(); 65 102 assertNotNull(iterator); 66 assertEquals(1, iterator.next().size()); 67 assertEquals(3, iterator.next().size()); 103 assertEquals(2, iterator.next().size()); 68 104 assertFalse(iterator.hasNext()); 69 105
Note: See TracChangeset
for help on using the changeset viewer.