public abstract class CollectionCase<COLLECTION extends Collection<ELEMENT>,ELEMENT> extends Object implements Case<COLLECTION>
| Modifier and Type | Class and Description |
|---|---|
static class |
CollectionCase.ListCase<T> |
static class |
CollectionCase.SetCase<T> |
| Constructor and Description |
|---|
CollectionCase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract COLLECTION |
createCollection(int expectedSize) |
Set<Subcase<COLLECTION>> |
getSubcases()
Returns the specific set of subcases that describe all equivalency classes for this case.
|
CollectionCase<COLLECTION,ELEMENT> |
withElementsOf(Case<ELEMENT> elementsCase) |
CollectionCase<COLLECTION,ELEMENT> |
withElementsOf(Supplier<Case<ELEMENT>> caseFunction) |
CollectionCase<COLLECTION,ELEMENT> |
withHomogeneousElementSuppliers()
Instructs this case to build collections where each element is created by the same supplier from its elements
case.
|
CollectionCase<COLLECTION,ELEMENT> |
withSize(int size) |
CollectionCase<COLLECTION,ELEMENT> |
withSizeOf(Case<Integer> sizeCase) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexcluding, excluding, excluding, generateAllOnce, generateAllOnce, generateAnyOnce, generateAnyOnce, or, orNullprotected abstract COLLECTION createCollection(int expectedSize)
public CollectionCase<COLLECTION,ELEMENT> withSizeOf(Case<Integer> sizeCase)
public CollectionCase<COLLECTION,ELEMENT> withSize(int size)
public CollectionCase<COLLECTION,ELEMENT> withElementsOf(Case<ELEMENT> elementsCase)
public CollectionCase<COLLECTION,ELEMENT> withElementsOf(Supplier<Case<ELEMENT>> caseFunction)
public CollectionCase<COLLECTION,ELEMENT> withHomogeneousElementSuppliers()
public Set<Subcase<COLLECTION>> getSubcases()
CaseCases are expected to return at least one subcase. When the fuzzy engine is determining how many test cases to execute, it does so in terms of subcases, not cases. Thus, when using the pairwise permutation algorithm, the fuzzy library works to ensure that each possible combination of two subcases are executed.
Note to implementors: cases should generally not include null values as
possible outputs. Instead, consumers are expected to use the Case.orNull() method (or, equivalently,
Any.nullableOf(com.redfin.fuzzy.Case<T>)) to declare that their cases should also generate null values.
getSubcases in interface Case<COLLECTION extends Collection<ELEMENT>>Copyright © 2017 Redfin. All rights reserved.