Implementing a Rule by a Test or Tests
A test expresses a condition in the form of an expression.
Implementing a modeling rule using a test consists of connecting this test to the rule. For a given object, the modeling rule is verified if application of the test that implements it returns the value "true".
You can connect several tests to a rule. In this case, the Logical Operator offers two possible options:
• And: the rule is verified only if all tests are positive.
• Or: a single test is sufficient to verify the rule.
For example, the rule "A message must have a sender and a receiver" is implemented by two tests :
• One test to verify origin of the message
• One test to verify destination of the message
The logical operator of the test is "And", which indicates that both tests must be positive for the rule to be verified.
A test can also be used in several rules.