Class ClasspathHellDuplicatesCheckRule
- java.lang.Object
-
- org.opendaylight.infrautils.testutils.ClasspathHellDuplicatesCheckRule
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class ClasspathHellDuplicatesCheckRule extends Object implements org.junit.rules.TestRule
JUnit Rule to run detect duplicate entries on the classpath. Usage:public static @ClassRule ClasspathHellDuplicatesCheckRule dupes = new ClasspathHellDuplicatesCheckRule();
NB that the basepom/duplicate-finder-maven-plugin already runs as part of odlparent. It has a similar purpose, but covers build time instead of runtime testing. This JUnit Rule class is thus recommended to be used in particular in tests which previously ran into JAR Hell issues, and for which non-regression with a clear failure message in case of future similar problems is important. (This provides more details at runtime than duplicate-finder-maven-plugin does at build time.)
- Author:
- Michael Vorburger.ch
-
-
Constructor Summary
Constructors Constructor Description ClasspathHellDuplicatesCheckRule()
ClasspathHellDuplicatesCheckRule(ClasspathHellDuplicatesChecker checker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
protected void
checkClasspath()
-
-
-
Constructor Detail
-
ClasspathHellDuplicatesCheckRule
public ClasspathHellDuplicatesCheckRule(ClasspathHellDuplicatesChecker checker)
-
ClasspathHellDuplicatesCheckRule
public ClasspathHellDuplicatesCheckRule()
-
-