1 package net.jaekl.cfb.analyze;
3 import static org.junit.Assert.*;
9 public class AnalyzerTest {
12 public void testOutputWorkFile() {
13 final String[][] DATA = {
14 // findBugsDir, workDir, FBP, expectedOutputXml
15 { "foo", "bar", "baz.fbp", "bar" + File.separator + "baz.xml" },
17 File.separator + "findbugs-3.01",
18 "." + File.separator + "work",
20 "." + File.separator + "work" + File.separator + "project.xml"
24 for (String[] datum : DATA) {
25 File findBugsDir = new File(datum[0]);
26 File workDir = new File(datum[1]);
27 File fbp = new File(datum[2]);
28 File expected = new File(datum[3]);
30 Analyzer analyzer = new Analyzer(findBugsDir);
31 File actual = analyzer.outputWorkFile(workDir, fbp);
32 assertEquals(expected.getAbsolutePath(), actual.getAbsolutePath());