self-assert / CollectableRule
Interface: CollectableRule<ValueType, CollectionType>
Describes a rule that knows how to collect failures into a list.
Extends
Type Parameters
Type Parameter |
---|
ValueType |
CollectionType extends void | Promise <void > |
Labeling
isLabeledAs()
isLabeledAs(
aBrokenRuleLabel
):boolean
Checks if the assertion has the same id and description as the given one.
Parameters
Parameter | Type |
---|---|
aBrokenRuleLabel | LabeledRule |
Returns
boolean
Inherited from
hasLabelId()
hasLabelId(
anId
):boolean
Compares the id of the assertion with the given one.
Parameters
Parameter | Type |
---|---|
anId | string |
Returns
boolean
Inherited from
hasLabel()
hasLabel(
anId
,aDescription
):boolean
Compare the id and description of the assertion with the given ones.
Parameters
Parameter | Type |
---|---|
anId | string |
aDescription | string |
Returns
boolean
Inherited from
hasDescription()
hasDescription(
aDescription
):boolean
Checks if the assertion has the given description.
Parameters
Parameter | Type |
---|---|
aDescription | string |
Returns
boolean
Remarks
This method is used mostly for testing.
Inherited from
getId()
getId():
string
Returns the label identifier.
Returns
string
Inherited from
getDescription()
getDescription():
string
Returns
string
Inherited from
Others
collectFailureInto()
collectFailureInto(
failed
,value
):CollectionType
Parameters
Parameter | Type |
---|---|
failed | LabeledRule [] |
value | ValueType |
Returns
CollectionType