forked from phoedos/pmd
Cleanup of test using reinitialization in XML test-data file
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4851 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -1,27 +1,19 @@
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
package test.net.sourceforge.pmd.rules;
|
||||
|
||||
/**
|
||||
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||
*/
|
||||
package test.net.sourceforge.pmd.rules;
|
||||
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
||||
import test.net.sourceforge.pmd.testframework.TestDescriptor;
|
||||
|
||||
public class LongVariableRuleTest extends SimpleAggregatorTst {
|
||||
private Rule rule;
|
||||
private TestDescriptor[] tests;
|
||||
|
||||
public void setUp() {
|
||||
rule = findRule("naming", "LongVariable");
|
||||
tests = extractTestsFromXml(rule);
|
||||
}
|
||||
|
||||
public void testAll() {
|
||||
runTests(new TestDescriptor[] {tests[0], tests[1], tests[2], tests[3], tests[4]});
|
||||
}
|
||||
|
||||
public void testThreshold() {
|
||||
runTest(tests[5]); //Need a fresh rule to work around caching
|
||||
}
|
||||
}
|
||||
import net.sourceforge.pmd.Rule;
|
||||
import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
||||
|
||||
public class LongVariableRuleTest extends SimpleAggregatorTst {
|
||||
private Rule rule;
|
||||
|
||||
public void setUp() {
|
||||
rule = findRule("naming", "LongVariable");
|
||||
}
|
||||
|
||||
public void testAll() {
|
||||
runTests(rule);
|
||||
}
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class Foo {
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
<test-code>
|
||||
<test-code reinitializeRule="true">
|
||||
<description><![CDATA[
|
||||
threshold test
|
||||
]]></description>
|
||||
|
Reference in New Issue
Block a user