Package com.tngtech.archunit.junit
Class ArchUnitRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<com.tngtech.archunit.junit.ArchTestExecution>
-
- com.tngtech.archunit.junit.ArchUnitRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Sortable
@PublicAPI(usage=ACCESS) public class ArchUnitRunner extends org.junit.runners.ParentRunner<com.tngtech.archunit.junit.ArchTestExecution>EvaluatesArchRulesagainst the classes inside of the packages specified via@AnalyzeClasseson the annotated test class.NOTE: The runner demands
Example:@AnalyzeClassesto be present on the respective test class.
The runner will cache classes between test runs, for details please refer to@RunWith(ArchUnitRunner.class) @AnalyzeClasses(packages = "com.example") public class SomeArchTest { @ArchTest public static final ArchRule some_rule = //... }ClassCache.
-
-
Constructor Summary
Constructors Constructor Description ArchUnitRunner(java.lang.Class<?> testClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.junit.runners.model.StatementclassBlock(org.junit.runner.notification.RunNotifier notifier)protected org.junit.runner.DescriptiondescribeChild(com.tngtech.archunit.junit.ArchTestExecution child)protected java.util.List<com.tngtech.archunit.junit.ArchTestExecution>getChildren()protected voidrunChild(com.tngtech.archunit.junit.ArchTestExecution child, org.junit.runner.notification.RunNotifier notifier)-
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
-
-
-
-
Method Detail
-
classBlock
protected org.junit.runners.model.Statement classBlock(org.junit.runner.notification.RunNotifier notifier)
- Overrides:
classBlockin classorg.junit.runners.ParentRunner<com.tngtech.archunit.junit.ArchTestExecution>
-
getChildren
protected java.util.List<com.tngtech.archunit.junit.ArchTestExecution> getChildren()
- Specified by:
getChildrenin classorg.junit.runners.ParentRunner<com.tngtech.archunit.junit.ArchTestExecution>
-
describeChild
protected org.junit.runner.Description describeChild(com.tngtech.archunit.junit.ArchTestExecution child)
- Specified by:
describeChildin classorg.junit.runners.ParentRunner<com.tngtech.archunit.junit.ArchTestExecution>
-
runChild
protected void runChild(com.tngtech.archunit.junit.ArchTestExecution child, org.junit.runner.notification.RunNotifier notifier)- Specified by:
runChildin classorg.junit.runners.ParentRunner<com.tngtech.archunit.junit.ArchTestExecution>
-
-