Some progress toward implementing store(Analysis).
[cfb.git] / test / net / jaekl / cfb / analyze / AnalysisTest.java
index f0b28c78db075e6f6ca9483b976f5be3b3ed59ee..5b48927e8f9cf5ef99dd2839608e5752f55330ea 100644 (file)
@@ -6,6 +6,7 @@ import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.nio.charset.Charset;
 import java.util.HashMap;
+import java.util.List;
 
 import net.jaekl.cfb.xml.BugCollection;
 import net.jaekl.cfb.xml.BugInstance;
@@ -66,14 +67,14 @@ public class AnalysisTest {
                        assertNotNull(analysis);
                        
                        BugCollection bugColl = analysis.getBugCollection();
+                       List<BugInstance> bugs = bugColl.getBugs();
                        
                        assertNotNull(bugColl);
-                       assertEquals(2, bugColl.size());
+                       assertEquals(2, bugs.size());
                        
                        HashMap<String, BugInstance> typeMap = new HashMap<String, BugInstance>();
-                       for (int idx = 0; idx < bugColl.size(); ++idx) {
-                               inst = bugColl.get(idx);
-                               typeMap.put(inst.getType(), inst);
+                       for (BugInstance bug : bugs) {
+                               typeMap.put(bug.getType(), bug);
                        }
                        
                        inst = typeMap.get("DM_DEFAULT_ENCODING");