B
- The concrete type of this builder (the 'self-type'). All the Builder methods of this
class (such as named(java.lang.String)
) return this type, so that Builder methods of more derived
classes can be chained onto them without casting.G
- The type of the generator to be passed to testers in the generated test suite. An
instance of G should somehow provide an instance of the class under test, plus any other
information required to parameterize the test.@GwtIncompatible public abstract class FeatureSpecificTestSuiteBuilder<B extends FeatureSpecificTestSuiteBuilder<B,G>,G> extends java.lang.Object
Constructor and Description |
---|
FeatureSpecificTestSuiteBuilder() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkCanCreate()
Throw
IllegalStateException if createTestSuite() can't be called yet. |
junit.framework.TestSuite |
createTestSuite()
Creates a runnable JUnit test suite based on the criteria already given.
|
protected static java.lang.String |
formatFeatureSet(java.util.Set<? extends Feature<?>> features) |
java.util.Set<Feature<?>> |
getFeatures() |
java.lang.String |
getName() |
protected java.lang.Runnable |
getSetUp() |
G |
getSubjectGenerator() |
java.util.Set<java.lang.reflect.Method> |
getSuppressedTests() |
protected java.lang.Runnable |
getTearDown() |
protected abstract java.util.List<java.lang.Class<? extends AbstractTester>> |
getTesters() |
protected junit.framework.TestSuite |
makeSuiteForTesterClass(java.lang.Class<? extends AbstractTester<?>> testerClass) |
B |
named(java.lang.String name)
Configures this builder produce a TestSuite with the given name.
|
protected B |
self() |
B |
suppressing(java.util.Collection<java.lang.reflect.Method> methods) |
B |
suppressing(java.lang.reflect.Method... methods)
Prevents the given methods from being run as part of the test suite.
|
protected B |
usingGenerator(G subjectGenerator) |
B |
withFeatures(Feature<?>... features)
Configures this builder to produce tests appropriate for the given features.
|
B |
withFeatures(java.lang.Iterable<? extends Feature<?>> features) |
B |
withSetUp(java.lang.Runnable setUp) |
B |
withTearDown(java.lang.Runnable tearDown) |
public FeatureSpecificTestSuiteBuilder()
protected B usingGenerator(G subjectGenerator)
public G getSubjectGenerator()
protected java.lang.Runnable getSetUp()
public B withTearDown(java.lang.Runnable tearDown)
protected java.lang.Runnable getTearDown()
public B withFeatures(Feature<?>... features)
public B withFeatures(java.lang.Iterable<? extends Feature<?>> features)
public java.util.Set<Feature<?>> getFeatures()
public B named(java.lang.String name)
public java.lang.String getName()
public B suppressing(java.lang.reflect.Method... methods)
Note: in principle this should never need to be used, but it might be useful if the semantics of an implementation disagree in unforeseen ways with the semantics expected by a test, or to keep dependent builds clean in spite of an erroneous test.
public B suppressing(java.util.Collection<java.lang.reflect.Method> methods)
public java.util.Set<java.lang.reflect.Method> getSuppressedTests()
public junit.framework.TestSuite createTestSuite()
protected void checkCanCreate()
IllegalStateException
if createTestSuite()
can't be called yet.protected abstract java.util.List<java.lang.Class<? extends AbstractTester>> getTesters()
protected junit.framework.TestSuite makeSuiteForTesterClass(java.lang.Class<? extends AbstractTester<?>> testerClass)
protected static java.lang.String formatFeatureSet(java.util.Set<? extends Feature<?>> features)
Copyright © 2010-2017. All Rights Reserved.