01: /**
02: * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
03: */package test.net.sourceforge.pmd.renderers;
04:
05: import net.sourceforge.pmd.PMD;
06: import net.sourceforge.pmd.Report.ProcessingError;
07: import net.sourceforge.pmd.renderers.AbstractRenderer;
08: import net.sourceforge.pmd.renderers.CSVRenderer;
09:
10: public class CSVRendererTest extends AbstractRendererTst {
11:
12: public AbstractRenderer getRenderer() {
13: return new CSVRenderer();
14: }
15:
16: public String getExpected() {
17: return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\""
18: + PMD.EOL
19: + "\"1\",\"\",\"n/a\",\"5\",\"1\",\"msg\",\"RuleSet\",\"Foo\""
20: + PMD.EOL;
21: }
22:
23: public String getExpectedEmpty() {
24: return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\""
25: + PMD.EOL;
26: }
27:
28: public String getExpectedMultiple() {
29: return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\""
30: + PMD.EOL
31: + "\"1\",\"\",\"n/a\",\"5\",\"1\",\"msg\",\"RuleSet\",\"Foo\""
32: + PMD.EOL
33: + "\"2\",\"\",\"n/a\",\"5\",\"1\",\"msg\",\"RuleSet\",\"Foo\""
34: + PMD.EOL;
35: }
36:
37: public String getExpectedError(ProcessingError error) {
38: return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\""
39: + PMD.EOL;
40: }
41:
42: public static junit.framework.Test suite() {
43: return new junit.framework.JUnit4TestAdapter(
44: CSVRendererTest.class);
45: }
46: }
|