self-assert / RuleLabel
Class: RuleLabel
Describes a rule by its id and description.
Implements
Constructors
Constructor
new RuleLabel(
id
,description
):RuleLabel
Parameters
Parameter | Type |
---|---|
id | string |
description | string |
Returns
RuleLabel
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
Implementation of
hasLabel()
hasLabel(
assertionId
,assertionDescription
):boolean
Compare the id and description of the assertion with the given ones.
Parameters
Parameter | Type |
---|---|
assertionId | string |
assertionDescription | string |
Returns
boolean
Implementation of
hasLabelId()
hasLabelId(
assertionId
):boolean
Compares the id of the assertion with the given one.
Parameters
Parameter | Type |
---|---|
assertionId | string |
Returns
boolean
Implementation of
hasDescription()
hasDescription(
description
):boolean
Checks if the assertion has the given description.
Parameters
Parameter | Type |
---|---|
description | string |
Returns
boolean
Remarks
This method is used mostly for testing.
Implementation of
getId()
getId():
string
Returns the label identifier.
Returns
string
Implementation of
getDescription()
getDescription():
string
Returns
string
Implementation of
Others
fromJson()
static
fromJson(__namedParameters
):RuleLabel
Parameters
Parameter | Type |
---|---|
__namedParameters | RuleLabelAsJson |
Returns
RuleLabel