The JUnit module specifications identify two stereotypes:

  • «JUnit» which is used to stereotype test classes that are created by the JUnit Module.

  • «JUnitDependency» which is used to stereotype dependency links that are established by the JUnit Module between the test classes and the model class they are testing.

Stereotypes declaration

  • Creating the "JUnit" stereotype:

    1. Right-click on Junit dev module stereotypes mprofile16 JUnitProfile to open its contextual menu, then select image Modelio Studio –> Junit dev module stereotypes mstereotype16 Stereotype.

    2. In the "Create a Stereotype" dialog box.

    3. Enter "JUnit" as Label

    4. Leave the Id field with the pre-filled value

    5. Enter "Class" for the Metaclass

    6. Is visible: Checked

    7. Owner stereotype: leave blank

    8. Description: Used to stereotype test classes.

    9. Select a 16x16 icon: Junit dev module stereotypes junitClass16

    10. Select a 32x32 (or 48x48) icon: Junit dev module stereotypes junit icon 32

  • Creating the "JUnitDependency" stereotype:

    1. Right-click on Junit dev module stereotypes mprofile16 JUnitProfile to open its contextual menu, then select image Modelio Studio –> Junit dev module stereotypes mstereotype16 Stereotype.

    2. In the "Create a Stereotype" dialog box.

    3. Enter "JUnitDependency" as Label

    4. Leave the Id field with the pre-filled value

    5. Enter "Dependency" for the Metaclass

    6. Is visible: Checked

    7. Owner stereotype: leave blank

    8. Description: This stereotype is used to identify the dependency link between a class of the model and its maching JUnit test class.

    9. Select a 16x16 icon: Junit dev module stereotypes junit icon dep 16

    10. Select a 32x32 (or 48x48) icon: Junit dev module stereotypes junit icon dep 48

Note:

  • Id value is the name of the stereotype.

  • label value is the name of the stereotype that will appear in Modelio gui and diagrams.

<< Creating a module profile

Index

Creating module commands >>