Defining an Implementation Test By an Expression
In the test properties dialog box, the Characteristics tab presents all MetaAssociationEnds and MetaAttributes of the tested MetaClass.
 
By drag-and-drop, you can place in the test expression the repository information to be tested.
*Test expression syntax is the same as that used to define conditions in properties dialog box configuration. For more details, see the technical article on properties dialog boxes.
You can:
describe a test by expressions and by the functions described below.
taking account of inheritance in tests (see Taking account of inheritance in tests)
Expression and logical operator
The expression of a test comprises expressions. These expressions can be logically combined using brackets " () " as well as logical operators.
Logical operators available are:
And and Xor
Xor is the exclusive "Or", that is "true when one and only one of the combined expressions is true".
It is also possible to use not to obtain the negative of an expression
Example:
(Expression1 and Expression2) or not Expression3
Comparison attribute and operator
The expression of a test can be defined using various functions and comparison operators.
Comparison operators are:
= <> > < >= <=
These comparison operators can be used to define an expression from the value of one of the MetaAttributes of the tested MetaClass.
Attribute operator Value
Example 
For an org-unit, the expression:
Internal/External = "X"
Returns "true" if the Internal/External attribute is "X" and false if not.
Reminder: here we use a tabulated value attribute and we therefore test its internal value).
 
For an operation, the expression:
Duration >= 40
Returns "true" if the Duration attribute is greater than or equal to 40.
*Operators >, <, <=, >= are of course only meaningful for attributes of a type enabling such comparison.
Warning: By proceeding in this way, we can test only attributes of the tested MetaClass. To be able to handle the attribute of a link from the MetaClass, the TrueForEach() and TrueForOne() functions subsequently presented should be used.
Function ItemCount() and comparison operator
Comparison operators can also be used to define an expression from the ItemCount function.
This function returns the number of objects found at the end of the MetaAssociationEnd or returned by the selector:
ItemCount(LegSel)
Where LegSel is a field representing a MetaAssociationEnd or a query.
Example 
For an org-unit, the expression:
ItemCount(Operation)>2
Returns "true" if the org-unit is connected to strictly more than 2 operations.
 
It is possible to use a shortcut to test if at least one object is connected by a MetaAssociationEnd.
Therefore, for an org-unit, the expression:
Operation=""
Returns "true" if no operation is connected.
Operation<>""
Returns "true" if at least one operation is connected.
*Use of a query in the ItemCount() function of course requires that the query starts from the currently tested object, or that this does not require an input object.
Functions TrueForEach() and TrueForOne()
These functions enable definition of an expression applying to an object or objects at the end of a MetaAssociationEnd or of a query.
 
TrueForEach returns "true" if the expression is true for all objects found at the end of the MetaAssociationEnd or returned by the query.
If no object is found or returned, this function returns "true".
 
TrueForEach returns "true" if the expression is true for at least one of the objects found at the end of the MetaAssociationEnd or returned by the query.
If no object is found or returned, this function returns "true".
TrueForEach(LegSel, Expression)
TrueForOne(LegSel, Expression)
Where LegSel is a field representing a MetaAssociationEnd or a query.
Example  
For an org-unit, the expression:
TrueForEach (Operation , Duration >= 40)
Returns "true" if the org-unit is connected only to operations of duration strictly greater than 40, or if the org-unit is not connected to any operation.
For an organizational process, the expression:
TrueForOne (Org-Unit, RACI = "R" or RACI = "E")
Returns "true" if the organizational process is connected to at least one org-unit with the RACI link attribute internal value "R" or "E".
 
Note here that when we use the TrueForEach and TrueForOne functions with a MetaAssociationEnd, it is possible to use in the expression :
The link attributes
and/or
The attributes of the object at the end of the link
 
In the expression used by a TrueForEach or TrueForOne function, it is of course possible to use one of these two functions again so as to take a new MetaAssociationEnd or to trigger a new query.
 
In the implementation test properties dialog box, the tree presenting the MetaAssociationEnds and MetaAttributes enables navigation in depth of the metamodel. It is therefore possible to drag-and-drop one of the attributes of an object at the end of a MetaAssociationEnd.
 
Other available functions
 
ItemExist(LegSel, Object)
Where LegSel is a field representing a MetaAssociationEnd or a query.
This function returns "true" if the specified object is connected via the identified MetaAssociationEnd or is present in the set of objects returned by the query.
 
Available(Object)
This function returns "true" if the specified object exists.
Taking account of inheritance in tests
To take account of inheritance in tests on a MetaAssociation, you can suffix the field by:
@INHERITING: displays objects that are inheriting
@INHERITED: displays inherited objects
@INHERITANCE: @INHERITING + @INHERITED
Example
From a MetaTest that relates to the Application MetaClass, you can define the following test:
ItemCount(~msUikEB5iGM3[Component]@INHERITED) > 2
Tests if the number of component applications of the tested application is more than 2 (including inherited component applications)
*You can also use inheritance with ItemExist.