Changeset 1417 for trunk/autoquest-plugin-http-test/src/test/java
- Timestamp:
- 02/28/14 12:23:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-plugin-http-test/src/test/java/de/ugoe/cs/autoquest/http/HTTPLogParserTest.java
r1369 r1417 21 21 import java.util.Collection; 22 22 import java.util.Iterator; 23 import java.util.LinkedList; 23 24 import java.util.List; 24 25 import java.util.logging.Level; … … 39 40 import de.ugoe.cs.autoquest.plugin.http.eventcore.HTTPEventType; 40 41 import de.ugoe.cs.autoquest.plugin.http.eventcore.HTTPTarget; 42 import de.ugoe.cs.autoquest.plugin.http.eventcore.SOAPEventType; 41 43 import de.ugoe.cs.util.console.TextConsole; 42 44 … … 126 128 } 127 129 } 128 130 131 /** 132 * Tests the parseFile method with a given trace file. 133 * @throws Exception 134 */ 135 @Test 136 public void testParseFile_2() throws Exception { 137 HTTPLogParser parser = new HTTPLogParser(); 138 parser.parseFile 139 (new File(ClassLoader.getSystemResource("httpmonitor_testtrace_1.xml").getFile())); 140 Collection<List<Event>> events = parser.getSequences(); 141 142 assertNotNull(events); 143 assertEquals(1, events.size()); 144 145 Iterator<List<Event>> iterator = events.iterator(); 146 assertNotNull(iterator); 147 assertEquals(876, iterator.next().size()); 148 assertFalse(iterator.hasNext()); 149 150 List<Event> soapEvents = new LinkedList<Event>(); 151 System.out.println("{"); 152 for (List<Event> session : events) { 153 System.out.println(" {"); 154 for (Event event : session) { 155 System.out.print(" "); 156 System.out.print(event); 157 System.out.println(","); 158 159 if (event.getType() instanceof SOAPEventType) { 160 assertNotNull(((SOAPEventType) event.getType()).getCalledMethod()); 161 soapEvents.add(event); 162 } 163 } 164 System.out.println(" }"); 165 } 166 System.out.println("}"); 167 System.out.println("\n\n"); 168 169 assertEquals(870, soapEvents.size()); 170 } 171 129 172 /** 130 173 *
Note: See TracChangeset
for help on using the changeset viewer.