Class ParameterizedClientTestRunner
- java.lang.Object
-
- org.junit.runner.Runner
-
- org.junit.runners.ParentRunner<org.junit.runners.model.FrameworkMethod>
-
- org.junit.runners.BlockJUnit4ClassRunner
-
- org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
-
- org.eclipse.scout.rt.testing.client.runner.ClientTestRunner
-
- org.eclipse.scout.rt.testing.client.runner.parameterized.ParameterizedClientTestRunner
-
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Orderable
,org.junit.runner.manipulation.Sortable
public class ParameterizedClientTestRunner extends ClientTestRunner
Parameterized form ofClientTestRunner
.
Note: The sharedIPlatform
is available while invoking theParameterized.Parameters
-annotated method, but it is no invoked within anIClientSession
context.
Example:@RunWith(ParameterizedServerTestRunner.class) public class SampleParameterizedServerTest { @Parameters public static List<IScoutTestParameter> getParameters() { List<IScoutTestParameter> parametersList = new LinkedList<IScoutTestParameter>(); parametersList.add(new MathTestParameter("Scenario 1", 2)); parametersList.add(new MathTestParameter("Scenario 2", 5)); return parametersList; } private final MathTestParameter m_testParameter; public SampleParameterizedServerTest(MathTestParameter testParameter) { m_testParameter = testParameter; } @Test public void testIsGreaterZero() { assertTrue(m_testParameter.getX() > 0); } @Test @NonParameterized public void testGeneral() { assertFalse(0 > 0); } static class MathTestParameter extends AbstractScoutTestParameter { private int m_x; public MathTestParameter(String name, int x) { super(name); m_x = x; } public int getX() { return m_x; } } }
- See Also:
ParameterizedServerTestRunner
,Parameterized
,Parameterized.Parameters
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.scout.rt.testing.client.runner.ClientTestRunner
ClientTestRunner.AddBlockingConditionTimeoutStatement, ClientTestRunner.CleanupDesktopStatement
-
Nested classes/interfaces inherited from class org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner.InterceptedAfterStatement, org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner.InterceptedBeforeStatement, org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner.RunAftersStatement
-
-
Constructor Summary
Constructors Constructor Description ParameterizedClientTestRunner(Class<?> klass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
collectInitializationErrors(List<Throwable> errors)
protected Object
createTest()
protected Object
createTestInternal(org.eclipse.scout.rt.testing.platform.runner.parameterized.IScoutTestParameter testParameter)
protected org.junit.runner.Description
describeChild(org.junit.runners.model.FrameworkMethod method)
protected List<org.junit.runners.model.FrameworkMethod>
getChildren()
protected org.junit.runners.model.Statement
methodBlock(org.junit.runners.model.FrameworkMethod method)
protected void
validateConstructor(List<Throwable> errors)
protected void
validateParametersMethod(List<Throwable> errors)
Validate the method which specifies the test parameters.-
Methods inherited from class org.eclipse.scout.rt.testing.client.runner.ClientTestRunner
createJUnitRunContext, interceptAfterStatement, interceptBeforeStatement, interceptClassLevelStatement, interceptMethodLevelStatement, withPotentialTimeout
-
Methods inherited from class org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
classBlock, getTimeoutMillis, hasNoTimeout, interceptAfterClassStatement, interceptBeforeClassStatement, possiblyExpectingExceptions, withAfterClasses, withAfters, withBeforeClasses, withBefores
-
Methods inherited from class org.junit.runners.BlockJUnit4ClassRunner
computeTestMethods, createTest, getTestRules, isIgnored, methodInvoker, rules, runChild, testName, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor
-
-
-
-
Constructor Detail
-
ParameterizedClientTestRunner
public ParameterizedClientTestRunner(Class<?> klass) throws org.junit.runners.model.InitializationError
- Throws:
org.junit.runners.model.InitializationError
-
-
Method Detail
-
getChildren
protected List<org.junit.runners.model.FrameworkMethod> getChildren()
- Overrides:
getChildren
in classorg.junit.runners.BlockJUnit4ClassRunner
-
createTest
protected final Object createTest() throws Exception
- Overrides:
createTest
in classorg.junit.runners.BlockJUnit4ClassRunner
- Throws:
Exception
-
createTestInternal
protected Object createTestInternal(org.eclipse.scout.rt.testing.platform.runner.parameterized.IScoutTestParameter testParameter) throws Exception
- Throws:
Exception
-
methodBlock
protected org.junit.runners.model.Statement methodBlock(org.junit.runners.model.FrameworkMethod method)
- Overrides:
methodBlock
in classorg.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
-
collectInitializationErrors
protected void collectInitializationErrors(List<Throwable> errors)
- Overrides:
collectInitializationErrors
in classorg.junit.runners.BlockJUnit4ClassRunner
-
validateConstructor
protected void validateConstructor(List<Throwable> errors)
- Overrides:
validateConstructor
in classorg.junit.runners.BlockJUnit4ClassRunner
-
validateParametersMethod
protected void validateParametersMethod(List<Throwable> errors)
Validate the method which specifies the test parameters.
-
describeChild
protected org.junit.runner.Description describeChild(org.junit.runners.model.FrameworkMethod method)
- Overrides:
describeChild
in classorg.junit.runners.BlockJUnit4ClassRunner
-
-