projects
/
cfb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the concept of "Project Name" to the RUNS table in the database.
[cfb.git]
/
test
/
net
/
jaekl
/
cfb
/
analyze
/
AnalysisTest.java
diff --git
a/test/net/jaekl/cfb/analyze/AnalysisTest.java
b/test/net/jaekl/cfb/analyze/AnalysisTest.java
index f0b28c78db075e6f6ca9483b976f5be3b3ed59ee..e874412281d6b2ca2189290600f9de5ae121d2f3 100644
(file)
--- a/
test/net/jaekl/cfb/analyze/AnalysisTest.java
+++ b/
test/net/jaekl/cfb/analyze/AnalysisTest.java
@@
-6,6
+6,7
@@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.HashMap;
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;
import net.jaekl.cfb.xml.BugCollection;
import net.jaekl.cfb.xml.BugInstance;
@@
-60,20
+61,20
@@
public class AnalysisTest {
try ( ByteArrayInputStream bais = new ByteArrayInputStream(SAMPLE1_XML.getBytes(utf8)))
{
InputSource inputSource = new InputSource(bais);
try ( ByteArrayInputStream bais = new ByteArrayInputStream(SAMPLE1_XML.getBytes(utf8)))
{
InputSource inputSource = new InputSource(bais);
- Analysis analysis = new Analysis(null);
+ Analysis analysis = new Analysis(null
, null
);
analysis.parse(inputSource);
assertNotNull(analysis);
BugCollection bugColl = analysis.getBugCollection();
analysis.parse(inputSource);
assertNotNull(analysis);
BugCollection bugColl = analysis.getBugCollection();
+ List<BugInstance> bugs = bugColl.getBugs();
assertNotNull(bugColl);
assertNotNull(bugColl);
- assertEquals(2, bug
Coll
.size());
+ assertEquals(2, bug
s
.size());
HashMap<String, BugInstance> typeMap = new HashMap<String, BugInstance>();
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");
}
inst = typeMap.get("DM_DEFAULT_ENCODING");