diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedFormalParameterRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedFormalParameterRuleTest.java new file mode 100644 index 0000000000..8545195e90 --- /dev/null +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedFormalParameterRuleTest.java @@ -0,0 +1,27 @@ +/* + * User: tom + * Date: Oct 11, 2002 + * Time: 4:41:46 PM + */ +package test.net.sourceforge.pmd.rules; + +import net.sourceforge.pmd.rules.UnusedFormalParameterRule; + +public class UnusedFormalParameterRuleTest extends RuleTst { + + private UnusedFormalParameterRule rule; + + public void setUp() { + rule = new UnusedFormalParameterRule(); + rule.setMessage("Avoid this stuff -> ''{0}''"); + } + public void testOneParam() throws Throwable { + runTest("UnusedFormalParam1.java", 1, rule); + } + public void testFullyQualified() throws Throwable { + runTest("UnusedFormalParam2.java", 0, rule); + } + public void testOneParamWithMethodCall() throws Throwable { + runTest("UnusedFormalParam3.java", 0, rule); + } +} diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java index a7bc762e6d..97cb1fd747 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UnusedPrivateMethodRuleTest.java @@ -36,13 +36,13 @@ public class UnusedPrivateMethodRuleTest extends RuleTst { assertEquals(1, report.size()); } - public void test5() throws Throwable { - Report report = process("UnusedPrivateMethod5.java", rule); + + public void test5() throws Throwable { + Report report = process("UnusedPrivateMethod5.java", rule); assertTrue(report.isEmpty()); } public void test6() throws Throwable { Report report = process("UnusedPrivateMethod6.java", rule); assertTrue(report.isEmpty()); } - }