[java] Split the rule tests for security

This commit is contained in:
Andreas Dangel
2018-09-09 11:02:09 +02:00
parent 5db7b174d9
commit 597d09dd68
3 changed files with 20 additions and 3 deletions

View File

@ -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
}

View File

@ -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
}

View File

@ -6,13 +6,12 @@ package net.sourceforge.pmd.lang.java.rule.security;
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";
@Override
public void setUp() {
addRule(RULESET, "HardCodedCryptoKey");
addRule(RULESET, "InsecureCryptoIv");
addRule(RULESET, getClass().getSimpleName().replaceFirst("Test$", ""));
}
}