Examples of TCGEvent


Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

      // source and target nodes must be in the same region -> one is substate of the other
      if(TCGNodeHelperClass.firstNodeIsSubStateOfOrEqualToSecondNode(
          oPreviousTransitionInstance.getTargetNode(), oCurrentTransitionInstance.getSourceNode()) ||
          TCGNodeHelperClass.firstNodeIsSubStateOfOrEqualToSecondNode(
          oCurrentTransitionInstance.getSourceNode(), oPreviousTransitionInstance.getTargetNode())) {
        TCGEvent oEvent = oCurrentTransitionInstance.getCalledEvent();
       
        if(oEvent != null) {
          return oEvent.isDefaultEvent();
        }
        else if(in_bAlsoIncludeNullEvents)
          return true;
      }
    }
   
    // last transition instance and still no event found -> check the outgoing transitions of the test case's last node
    TransitionInstance oTransitionInstance = in_oTestCase.getTransitionInstances().get(
        in_oTestCase.getTransitionInstances().size() - 1);
    TCGNode oLastNode = oTransitionInstance.getTargetNode();
    for(TCGTransition oOutgoingTransition : TCGNodeHelperClass.getOutgoingTransitions(oLastNode)) {
      if(oOutgoingTransition.isCanBeProcessed()) {
        for(TCGEvent oEvent : oOutgoingTransition.getEvents()) {
          if (oEvent.isDefaultEvent() &&
            TCGTransitionInstanceHelperClass.checkSatisfactionOfCondition(
                oTransitionInstance, oOutgoingTransition.getPrecondition()))
            return true;
        }
      }
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

    // impact e.g. on conflict checks for test goal generation -> may result in multiple definitions of the same parameter
    //boolean bUsedUniqueEventInstances = false;
    boolean bUsedUniqueEventInstances = true;
   
    //if(in_oTransition.getSource() instanceof State) {
      TCGEvent oUsedEvent = null;
      // add triggering event
      if(in_colEvents.isEmpty()) {
        if(bUsedUniqueEventInstances) oUsedEvent = m_colEventMapping.get(null);
        if(oUsedEvent == null) {
          oUsedEvent = TCGEventHelperClass.createTCGEvent(null, true);
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

  {
    // guard condition
    String sGuard = SystemModelHelper.getTransitionGuard(in_oTransition);
   
    //for(TCGEvent oEvent : in_oActualTCGTransition.getEvents()) {
    TCGEvent oEvent = null;
    if(!in_oActualTCGTransition.getEvents().isEmpty())
      oEvent = in_oActualTCGTransition.getEvents().get(0);
   
    // corresponding namespace (of corresponding operation)
    Namespace oNamespace = SystemModelHelper.getNamespaceForEvent(
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

        getOutputForConditionInTransitionInstance(
            in_oTransitionInstance, oExpression);     
    }
   
    // handle methods event
    TCGEvent oEvent = in_oTransitionInstance.getCalledEvent();
    if(oEvent != null && isEventPrintingAllowed(oEvent))
    {
      String sEvent = oEvent.getName();
      if(sEvent.length() > 0)
      {
        in_oFormattedOutput.append(m_sObjectName + "."
            + sEvent + "(");
        List<TCGParameter> oParamList =
          TCGParameterHelperClass.copyAllButReturnValues(oEvent.getParameters());
        String sNameSuffix = TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
            in_oTransitionInstance).getName();
        boolean bIsNotFirstElement = false;
        for(TCGParameter oParameter : oParamList)
        {
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

        getOutputForConditionInTransitionInstance(
            in_oTransitionInstance, oExpression);     
    }
   
    // handle methods event
    TCGEvent oEvent = in_oTransitionInstance.getCalledEvent();
    if(oEvent != null && isEventPrintingAllowed(oEvent))
    {
      String sEvent = oEvent.getName();
      if(sEvent.length() > 0)
      {
        in_oFormattedOutput.append(m_sObjectName + "." + m_sEventCallName +
            "(\"" + sEvent + "\"");
        List<TCGParameter> oParamList =
          TCGParameterHelperClass.copyAllButReturnValues(oEvent.getParameters());
        String sNameSuffix = TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
            in_oTransitionInstance).getName();
        for(TCGParameter oParameter : oParamList)
        {
          in_oFormattedOutput.append(", " + oParameter.getName() + sNameSuffix);
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

  public void createOutput(TransitionInstance in_oTransitionInstance) {
   
    // preconditions are of no interest ... do not check them
   
    // event call information
    TCGEvent oEvent = in_oTransitionInstance.getCalledEvent();
    if(oEvent != null && isEventPrintingAllowed(oEvent)) {
      String sEvent = oEvent.getName();
      if(sEvent.length() > 0) {
        Call oCall = TestsuiteexportFactory.eINSTANCE.createCall();
        String sNameSuffix = TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
            in_oTransitionInstance).getName();
        oCall.setEvent(in_oTransitionInstance.getCalledEvent().getName());
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

        getOutputForConditionInTransitionInstance(
            in_oTransitionInstance, oExpression);     
    }
   
    // handle methods event
    TCGEvent oEvent = in_oTransitionInstance.getCalledEvent();
    if(oEvent != null && isEventPrintingAllowed(oEvent))
    {
      String sEvent = oEvent.getName();
      if(sEvent.length() > 0)
      {
        in_oFormattedOutput.append(m_sObjectName + "." + m_sEventCallName +
            "(\"" + sEvent + "\"");
        List<TCGParameter> oParamList =
          TCGParameterHelperClass.copyAllButReturnValues(oEvent.getParameters());

        String sNameSuffix = TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
            in_oTransitionInstance).getName();
        for(TCGParameter oParameter : oParamList)
        {
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

//        }
//      }
//    }
   
    // handle methods event
    TCGEvent oEvent = in_oTransitionInstance.getCalledEvent();
    if(oEvent != null && isEventPrintingAllowed(oEvent)) {
      String sEvent = oEvent.getName();
      if(sEvent.length() > 0) {
        List<TCGParameter> oParamList =
          TCGParameterHelperClass.copyAllButReturnValues(oEvent.getParameters());
        String sNameSuffix = TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
            in_oTransitionInstance).getName();

        if(oParamList.isEmpty()) {
          in_oFormattedOutput.appendln("<call object=\"" + m_sObjectName +
View Full Code Here

Examples of net.sf.parteg.base.testcasegraph.generated.TCGEvent

        }
      }
    }
   
    // handle methods event
    TCGEvent oEvent = in_oTransitionInstance.getCalledEvent();
    if(oEvent != null && isEventPrintingAllowed(oEvent))
    {
      String sEvent = oEvent.getName();
      // no default call
      if(sEvent.length() > 0) {
        in_oFormattedOutput.append(m_sObjectName + "." + m_sEventCallName +
            "(\"" + sEvent + "\"");
        List<TCGParameter> oParamList =
          TCGParameterHelperClass.copyAllButReturnValues(oEvent.getParameters());
        String sNameSuffix = TCGParameterHelperClass.findTransitionInstanceDefiningTheCurrentEvent(
            in_oTransitionInstance).getName();
        for(TCGParameter oParameter : oParamList)
        {
          in_oFormattedOutput.append(", " + oParameter.getName() + sNameSuffix);
View Full Code Here

Examples of net.sf.parteg.base.testcasetree.generated.TCGEvent

   * @param in_oSMEvent
   * @return
   */
  public static TCGEvent createTCGEvent(Event in_oSMEvent, boolean in_bCreateTCGEventIfEventIsNull)
  {
    TCGEvent oTCGEvent = GeneratedFactory.eINSTANCE.createTCGEvent();
    if(in_oSMEvent != null){
      oTCGEvent.setName(in_oSMEvent.getName());
      oTCGEvent.setEvent(in_oSMEvent);
      oTCGEvent.setDefaultEvent(false);
    }
    else if(in_bCreateTCGEventIfEventIsNull)
    {
      oTCGEvent.setName(Configuration.getDefaultTransitionName());
      oTCGEvent.setEvent(null);
      oTCGEvent.setDefaultEvent(true);
    }
    else
      oTCGEvent = null;
    return oTCGEvent;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.