[java] Split the rule tests for security
This commit is contained in:
@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.sourceforge.pmd.lang.java.rule.security;
|
||||||
|
|
||||||
|
public class HardCodedCryptoKeyTest extends SecurityRulesTest {
|
||||||
|
// no additional unit tests
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
/**
|
||||||
|
* BSD-style license; for more info see http://pmd.sourceforge.net/license.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.sourceforge.pmd.lang.java.rule.security;
|
||||||
|
|
||||||
|
public class InsecureCryptoIvTest extends SecurityRulesTest {
|
||||||
|
// no additional unit tests
|
||||||
|
}
|
@ -6,13 +6,12 @@ package net.sourceforge.pmd.lang.java.rule.security;
|
|||||||
|
|
||||||
import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
import net.sourceforge.pmd.testframework.SimpleAggregatorTst;
|
||||||
|
|
||||||
public class SecurityRulesTest extends SimpleAggregatorTst {
|
public abstract class SecurityRulesTest extends SimpleAggregatorTst {
|
||||||
|
|
||||||
private static final String RULESET = "category/java/security.xml";
|
private static final String RULESET = "category/java/security.xml";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setUp() {
|
public void setUp() {
|
||||||
addRule(RULESET, "HardCodedCryptoKey");
|
addRule(RULESET, getClass().getSimpleName().replaceFirst("Test$", ""));
|
||||||
addRule(RULESET, "InsecureCryptoIv");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user