Skip to content

self-assert / LabeledRule

Interface: LabeledRule

Describes a rule by its id and description.

Extended by

Labeling

isLabeledAs()

isLabeledAs(aBrokenRuleLabel): boolean

Checks if the assertion has the same id and description as the given one.

Parameters

ParameterType
aBrokenRuleLabelLabeledRule

Returns

boolean


hasLabelId()

hasLabelId(anId): boolean

Compares the id of the assertion with the given one.

Parameters

ParameterType
anIdstring

Returns

boolean


hasLabel()

hasLabel(anId, aDescription): boolean

Compare the id and description of the assertion with the given ones.

Parameters

ParameterType
anIdstring
aDescriptionstring

Returns

boolean


hasDescription()

hasDescription(aDescription): boolean

Checks if the assertion has the given description.

Parameters

ParameterType
aDescriptionstring

Returns

boolean

Remarks

This method is used mostly for testing.


getId()

getId(): string

Returns the label identifier.

Returns

string


getDescription()

getDescription(): string

Returns

string