View Javadoc

    1   /**
    2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
    3    */
    4   package net.sourceforge.pmd.renderers;
    5
    6   import net.sourceforge.pmd.PMD;
    7   import net.sourceforge.pmd.Report.ProcessingError;
    8
    9   public class CSVRendererTest extends AbstractRendererTst {
    10
    11      public Renderer getRenderer() {
    12          return new CSVRenderer();
    13      }
    14
    15      public String getExpected() {
    16          return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\"" + PMD.EOL
    17                  + "\"1\",\"\",\"n/a\",\"5\",\"1\",\"msg\",\"RuleSet\",\"Foo\"" + PMD.EOL;
    18      }
    19
    20      public String getExpectedEmpty() {
    21          return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\"" + PMD.EOL;
    22      }
    23
    24      public String getExpectedMultiple() {
    25          return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\"" + PMD.EOL
    26          + "\"1\",\"\",\"n/a\",\"5\",\"1\",\"msg\",\"RuleSet\",\"Foo\"" + PMD.EOL
    27          + "\"2\",\"\",\"n/a\",\"5\",\"1\",\"msg\",\"RuleSet\",\"Foo\"" + PMD.EOL;
    28      }
    29
    30      public String getExpectedError(ProcessingError error) {
    31          return "\"Problem\",\"Package\",\"File\",\"Priority\",\"Line\",\"Description\",\"Rule set\",\"Rule\"" + PMD.EOL;
    32      }
    33
    34      public static junit.framework.Test suite() {
    35          return new junit.framework.JUnit4TestAdapter(CSVRendererTest.class);
    36      }
    37  }