Java Reference
In-Depth Information
type := 'org.eclipse.hyades.test.manual.testSuite';
persistenceId := 'HyadesFacadeResource';
name := self .name;
description := self .name;
instances += object Common_Configuration::CFGInstance {
classType := result ;
lifeline := lifeline;
};
behavior := object Common_Testprofile::TPFBehavior {
name := result .name + '_behavior';
resource := result .name + '.Test';
interaction := object Common_Behavior_Fragments::BVRInteraction {
lifelines += lifeline;
interactionFragments += self .elements.selectGateways(). map
toInteractionFragment();
}
};
testCases += self .elements.selectTasks(). map toTestCase();
end {
result .testCases.setInstance( result );
}
}
mapping scenario::Gateway::toInteractionFragment() :
Common_Behavior_Fragments::BVRCombinedFragment
when {
self .formsLoop( self )
} {
name := 'Iterate';
interactionOperator := BVRInteractionOperator::loop;
interactionOperands += object
Common_Behavior_Fragments::BVRInteractionOperand {
interactionFragments += self .collectLoopTasks(). map
toExecutionOccurrence();
interactionConstraint := object
Common_Behavior_Fragments::BVRInteractionConstraint {
constraint := 'n';
}
}
}
mapping scenario::Task::toExecutionOccurrence() :
Common_Behavior_Interactions::BVRExecutionOccurrence {
name := self .name + ' - invocation';
otherBehavior := self . late
resolveone (Common_Testprofile::TPFBehavior);
}
query scenario::Element::formsLoop(target : scenario::Gateway) :
Boolean {
-- limit to Task elements for now
var tasks : OrderedSet (scenario::Task) :=
self .outgoing.target.selectTasks()->asOrderedSet();
var loop : Boolean := tasks.completesLoop(target)
->includes( true );
Search WWH ::




Custom Search