From b4e8751acb60086d48f120178fba618880930599 Mon Sep 17 00:00:00 2001 From: Xavier Le Vourch Date: Thu, 25 Oct 2007 22:53:06 +0000 Subject: [PATCH] no need to redefine testAll() and ignore it if no rule is inserted in setup git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@5586 51baf565-9d33-0410-a72c-fc3788e3496d --- .../pmd/rules/UselessAssignmentRuleTest.java | 37 +++++++------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/UselessAssignmentRuleTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/UselessAssignmentRuleTest.java index c3f7520678..2f427ea151 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/UselessAssignmentRuleTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/UselessAssignmentRuleTest.java @@ -1,29 +1,18 @@ - - package test.net.sourceforge.pmd.rules; - - import net.sourceforge.pmd.Rule; +package test.net.sourceforge.pmd.rules; import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst; - - public class UselessAssignmentRuleTest extends SimpleAggregatorTst { - private Rule rule; - - @Before - public void setUp() { - rule = findRule("rulesets/scratchpad.xml", "UselessAssignment"); - } - - @Ignore("Scratchpad rule - throwing exception") - @Test - public void testAll() { - runTests(rule); - } - public static junit.framework.Test suite() { - return new junit.framework.JUnit4TestAdapter(UselessAssignmentRuleTest.class); - } - } +public class UselessAssignmentRuleTest extends SimpleAggregatorTst { + + @Before + public void setUp() { + // addRule("scratchpad", "UselessAssignment"); + } + + public static junit.framework.Test suite() { + return new junit.framework.JUnit4TestAdapter( + UselessAssignmentRuleTest.class); + } +}