Package org.hibernate.testing.junit4
Class CustomRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
- org.junit.runners.BlockJUnit4ClassRunner
-
- org.hibernate.testing.junit4.CustomRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Orderable
,org.junit.runner.manipulation.Sortable
public class CustomRunner extends org.junit.runners.BlockJUnit4ClassRunner
The Hibernate-specificRunner
implementation which layersExtendedFrameworkMethod
support on top of the standard JUnitFrameworkMethod
for extra information after checking to make sure the test should be run.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CustomRunner.IgnoreImpl
-
Field Summary
Fields Modifier and Type Field Description protected Object
testInstance
-
Constructor Summary
Constructors Constructor Description CustomRunner(Class<?> clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.junit.runners.model.Statement
classBlock(org.junit.runner.notification.RunNotifier notifier)
protected void
collectInitializationErrors(List<Throwable> errors)
protected List<org.junit.runners.model.FrameworkMethod>
computeTestMethods()
protected org.junit.Ignore
convertSkipToIgnore(org.junit.runners.model.FrameworkMethod frameworkMethod)
protected Object
createTest()
protected List<org.junit.runners.model.FrameworkMethod>
doComputation()
TestClassMetadata
getTestClassMetadata()
protected Object
getTestInstance()
protected boolean
isAllTestsIgnored()
protected org.junit.runners.model.Statement
methodBlock(org.junit.runners.model.FrameworkMethod method)
protected void
sortMethods(List<org.junit.runners.model.FrameworkMethod> computedTestMethods)
protected org.junit.runners.model.Statement
withAfterClasses(org.junit.runners.model.Statement statement)
protected org.junit.runners.model.Statement
withBeforeClasses(org.junit.runners.model.Statement statement)
-
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, possiblyExpectingExceptions, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor, withAfters, withBefores, withPotentialTimeout
-
-
-
-
Field Detail
-
testInstance
protected Object testInstance
-
-
Constructor Detail
-
CustomRunner
public CustomRunner(Class<?> clazz) throws org.junit.runners.model.InitializationError, org.junit.runner.manipulation.NoTestsRemainException
- Throws:
org.junit.runners.model.InitializationError
org.junit.runner.manipulation.NoTestsRemainException
-
-
Method Detail
-
collectInitializationErrors
protected void collectInitializationErrors(List<Throwable> errors)
- Overrides:
collectInitializationErrors
in classorg.junit.runners.BlockJUnit4ClassRunner
-
getTestClassMetadata
public TestClassMetadata getTestClassMetadata()
-
isAllTestsIgnored
protected boolean isAllTestsIgnored()
-
withBeforeClasses
protected org.junit.runners.model.Statement withBeforeClasses(org.junit.runners.model.Statement statement)
- Overrides:
withBeforeClasses
in classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
withAfterClasses
protected org.junit.runners.model.Statement withAfterClasses(org.junit.runners.model.Statement statement)
- Overrides:
withAfterClasses
in classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
classBlock
protected org.junit.runners.model.Statement classBlock(org.junit.runner.notification.RunNotifier notifier)
- Overrides:
classBlock
in classorg.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
- See Also:
ParentRunner.classBlock(RunNotifier)
-
methodBlock
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
- Overrides:
methodBlock
in classorg.junit.runners.BlockJUnit4ClassRunner
-
createTest
protected Object createTest() throws Exception
- Overrides:
createTest
in classorg.junit.runners.BlockJUnit4ClassRunner
- Throws:
Exception
-
computeTestMethods
protected List<org.junit.runners.model.FrameworkMethod> computeTestMethods()
- Overrides:
computeTestMethods
in classorg.junit.runners.BlockJUnit4ClassRunner
-
sortMethods
protected void sortMethods(List<org.junit.runners.model.FrameworkMethod> computedTestMethods)
-
doComputation
protected List<org.junit.runners.model.FrameworkMethod> doComputation()
-
convertSkipToIgnore
protected org.junit.Ignore convertSkipToIgnore(org.junit.runners.model.FrameworkMethod frameworkMethod)
-
-