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