"Finalize" the list of cases and begin defining subcases. Returns a new SubcaseParamsBuilder. Methods called on SubcaseParamsBuilder generate new subcases instead of new cases.
Expands each item in this
to multiple items with { [name]: value }
for each value.
In other words, takes the cartesian product of [ the items in this
]
and [ {[name]: value} for each value in values ]
Expands each item in this
to multiple items, one for each item in newParams
.
In other words, takes the cartesian product of [ the items in this
] and newParams
.
Note: When only a single key is being added, use the simpler combine
for readability.
this = [ {a:1}, {b:2} ]
newParams = [ {x:1}, {y:2} ]
this.combineP(newParams) = [ {a:1,x:1}, {a:1,y:2}, {b:2,x:1}, {b:2,y:2} ]
Expands each item in this
into zero or more items. Each item has its parameters expanded
with one new key, key
, and the values returned by expander
.
Expands each item in this
into zero or more items.
Each item has its parameters expanded with those returned by the expander
.
Note: When only a single key is being added, use the simpler expand
for readability.
this = [ a , b , c ]
this.map(expander) = [ f(a) f(b) f(c) ]
= [[a1, a2, a3] , [ b1 ] , [] ]
merge and flatten = [ merge(a, a1), merge(a, a2), merge(a, a3), merge(b, b1) ]
Filters this
to only items for which pred
returns true.
Filters this
to only items for which pred
returns false.
Generated using TypeDoc
Builder for combinatorial test case parameters.
CaseParamsBuilder is immutable. Each method call returns a new, immutable object, modifying the list of cases according to the method called.
This means, for example, that the
unit
passed intoTestBuilder.params()
can be reused.