Package org.gradle.exemplar.test.runner
Class SamplesRunner
java.lang.Object
org.junit.runner.Runner
org.junit.runners.ParentRunner<org.gradle.exemplar.model.Sample>
org.gradle.exemplar.test.runner.SamplesRunner
- All Implemented Interfaces:
org.junit.runner.Describable,org.junit.runner.manipulation.Filterable,org.junit.runner.manipulation.Orderable,org.junit.runner.manipulation.Sortable
- Direct Known Subclasses:
EmbeddedSamplesRunner,GradleSamplesRunner
public class SamplesRunner
extends org.junit.runners.ParentRunner<org.gradle.exemplar.model.Sample>
A JUnit test runner that verifies all samples discovered in the directory specified by the
SamplesRoot annotation.-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.junit.rules.TemporaryFolder -
Constructor Summary
ConstructorsConstructorDescriptionSamplesRunner(Class<?> testClass) Constructs a newParentRunnerthat will run@TestClass -
Method Summary
Modifier and TypeMethodDescriptionprotected org.junit.runner.DescriptiondescribeChild(org.gradle.exemplar.model.Sample child) protected List<org.gradle.exemplar.model.Sample>protected FileAllows a subclass to provide an implicit samples root dir when one is not explicitly defined usingSamplesRoot.protected Fileprotected voidrunChild(org.gradle.exemplar.model.Sample sample, org.junit.runner.notification.RunNotifier notifier) protected CommandExecutorselectExecutor(ExecutionMetadata executionMetadata, File workingDir, org.gradle.exemplar.model.Command command) Allows a subclass to provide a customCommandExecutor.Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolationMethods inherited from class org.junit.runner.Runner
testCount
-
Field Details
-
SAFE_SYSTEM_PROPERTIES
-
tmpDir
public org.junit.rules.TemporaryFolder tmpDir
-
-
Constructor Details
-
SamplesRunner
Constructs a newParentRunnerthat will run@TestClass- Parameters:
testClass- reference to test class being run- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
getChildren
- Specified by:
getChildrenin classorg.junit.runners.ParentRunner<org.gradle.exemplar.model.Sample>
-
getSamplesRootDir
-
getImplicitSamplesRootDir
Allows a subclass to provide an implicit samples root dir when one is not explicitly defined usingSamplesRoot. -
describeChild
protected org.junit.runner.Description describeChild(org.gradle.exemplar.model.Sample child) - Specified by:
describeChildin classorg.junit.runners.ParentRunner<org.gradle.exemplar.model.Sample>
-
runChild
protected void runChild(org.gradle.exemplar.model.Sample sample, org.junit.runner.notification.RunNotifier notifier) - Specified by:
runChildin classorg.junit.runners.ParentRunner<org.gradle.exemplar.model.Sample>
-
selectExecutor
protected CommandExecutor selectExecutor(ExecutionMetadata executionMetadata, File workingDir, org.gradle.exemplar.model.Command command) Allows a subclass to provide a customCommandExecutor.
-