View Javadoc

1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.cli;
5   
6   import org.junit.Assert;
7   import org.junit.Test;
8   
9   /**
10   * Unit test for {@link PMDCommandLineInterface}
11   */
12  public class PMDCommandLineInterfaceTest {
13  
14      @Test
15      public void testProperties() {
16          PMDParameters params = new PMDParameters();
17          String[] args = { "-d", "source_folder", "-f", "yahtml", "-P", "outputDir=output_folder",
18                  "-R", "java-empty" };
19          PMDCommandLineInterface.extractParameters(params, args, "PMD");
20  
21          Assert.assertEquals("output_folder", params.getProperties().getProperty("outputDir"));
22      }
23  }