Java Reference
In-Depth Information
type := 'org.eclipse.hyades.test.manual.testCase';
behavior := self . map toBehavior();
}
mapping scenario::Task::toBehavior() : Common_Testprofile::TPFBehavior {
name := self .name + '_behavior';
interaction := object Common_Behavior_Fragments::BVRInteraction {
lifelines += object
Common_Behavior_Interactions::BVRLifeline {
name := '_selfLifeline';
}
}
}
query scenario::Element::selectGateways() :
OrderedSet (scenario::Gateway) {
return self->select(oclIsTypeOf(scenario::Gateway))
-> collect ( oclAsType (scenario::Gateway))->asOrderedSet();
}
-- TODO: use collectselect shorthand notation [Task]
query scenario::Element::selectTasks() : OrderedSet (scenario::Task) {
return self->select(oclIsTypeOf(scenario::Task))
-> collect ( oclAsType (scenario::Task))->asOrderedSet();
}
Figure 6-16 through 6-18 are images of the input model and the resulting
TPTP Manual test case, opened in its own form-based editor. The sequence has
two simple loops, which you can see are transformed to test iterations. Although
this short example is simplified for illustrative purposes, you can see how lever-
aging EMF models for multiple components leads to powerful integration possi-
bilities using QVT and other modeling technologies introduced in this topic.
TIP
When creating a dynamic instance model for models such as the scenario,
it's much easier to diagram one than to use the reflective editor tree and
properties view. To make it easier, launch the runtime workspace and dia-
gram the model; then open it with a text editor and copy the elements
within the root and paste them within the XMI file. Be careful not to copy
over the root element.
 
Search WWH ::




Custom Search