Add code to load bug categories and patterns from the FindBugs messages.xml file.
[cfb.git] / test / net / jaekl / cfb / analyze / AnalyzerTest.java
index d7e8395cd173f0907030e76ca2671e91aa540243..85bd3d2950dcc26044d77c3e1989ae5e29a98910 100644 (file)
@@ -1,13 +1,12 @@
 package net.jaekl.cfb.analyze;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 
 import org.junit.Test;
 
 public class AnalyzerTest {
-
        @Test
        public void testOutputWorkFile() {
                final String[][] DATA = {
@@ -27,7 +26,10 @@ public class AnalyzerTest {
                        File fbp         = new File(datum[2]);
                        File expected    = new File(datum[3]);
 
-                       Analyzer analyzer = new Analyzer(findBugsDir);
+                       MessageMapMock mmm = new MessageMapMock();
+                       mmm.mock_setFindBugsDir(findBugsDir);
+
+                       Analyzer analyzer = new Analyzer(mmm);
                        File actual = analyzer.outputWorkFile(workDir, fbp);
                        assertEquals(expected.getAbsolutePath(), actual.getAbsolutePath());
                }