|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.common.collect.testing.FeatureSpecificTestSuiteBuilder<B,G>
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.public abstract class FeatureSpecificTestSuiteBuilder<B extends FeatureSpecificTestSuiteBuilder<B,G>,G>
Creates, based on your criteria, a JUnit test suite that exhaustively tests the object generated by a G, selecting appropriate tests by matching them against specified features.
Constructor Summary | |
---|---|
FeatureSpecificTestSuiteBuilder()
|
Method Summary | |
---|---|
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 String |
formatFeatureSet(Set<? extends Feature<?>> features)
|
Set<Feature<?>> |
getFeatures()
|
String |
getName()
|
protected Runnable |
getSetUp()
|
G |
getSubjectGenerator()
|
Set<Method> |
getSuppressedTests()
|
protected Runnable |
getTearDown()
|
protected abstract List<Class<? extends AbstractTester>> |
getTesters()
|
protected junit.framework.TestSuite |
makeSuiteForTesterClass(Class<? extends AbstractTester<?>> testerClass)
|
B |
named(String name)
Configures this builder produce a TestSuite with the given name. |
protected B |
self()
|
B |
suppressing(Collection<Method> methods)
|
B |
suppressing(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(Iterable<? extends Feature<?>> features)
|
B |
withSetUp(Runnable setUp)
|
B |
withTearDown(Runnable tearDown)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureSpecificTestSuiteBuilder()
Method Detail |
---|
protected B self()
protected B usingGenerator(G subjectGenerator)
public G getSubjectGenerator()
public B withSetUp(Runnable setUp)
protected Runnable getSetUp()
public B withTearDown(Runnable tearDown)
protected Runnable getTearDown()
public B withFeatures(Feature<?>... features)
public B withFeatures(Iterable<? extends Feature<?>> features)
public Set<Feature<?>> getFeatures()
public B named(String name)
public String getName()
public B suppressing(Method... methods)
public B suppressing(Collection<Method> methods)
public Set<Method> getSuppressedTests()
public junit.framework.TestSuite createTestSuite()
protected void checkCanCreate()
IllegalStateException
if createTestSuite()
can't
be called yet.
protected abstract List<Class<? extends AbstractTester>> getTesters()
protected junit.framework.TestSuite makeSuiteForTesterClass(Class<? extends AbstractTester<?>> testerClass)
protected static String formatFeatureSet(Set<? extends Feature<?>> features)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |