Examples of TCGNode


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

      if(m == 20) {
      }
      if(oTestGoal instanceof TestGoalGuardConditions) {
        TestGoalGuardConditions oTestGoalGuard =
          (TestGoalGuardConditions)oTestGoal;
        TCGNode oNode = (TCGNode)oTestGoalGuard.getElement();
        TCGEvent oEvent = oTestGoalGuard.getEventToBeCalled();
        TCGDisjunctiveNormalForm oDNF = oTestGoalGuard.getDNFToBeSatisfied();

        ArrayList<TCGConjunction> colConjunctionsToTheFront =
          new ArrayList<TCGConjunction>();
View Full Code Here

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

//        ++x;
//      }
      if(oTestGoal instanceof TestGoalGuardConditions) {
        TestGoalGuardConditions oTestGoalGuard =
          (TestGoalGuardConditions)oTestGoal;
        TCGNode oNode = (TCGNode)oTestGoalGuard.getElement();
        TCGEvent oEvent = oTestGoalGuard.getEventToBeCalled();
        TCGDisjunctiveNormalForm oDNF = oTestGoalGuard.getDNFToBeSatisfied();

        ArrayList<TCGConjunction> colConjunctionsToTheFront =
          new ArrayList<TCGConjunction>();
View Full Code Here

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

      TCGEvent in_oEvent,
      TCGConjunction in_oConjunction) {
    List<TCGTransition> colTransitions =
      TCGTransitionHelperClass.findResultingTransitions(
        in_oNode, in_oEvent, in_oConjunction);
    TCGNode oTargetState = null;
    if(colTransitions.size() != 1) {
      oTargetState = in_oNode;
    }
    else {
      oTargetState = colTransitions.get(0).getTargetNode();
View Full Code Here

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

    for(TestGoalBase oTestGoal : io_colGoals) {
      Double nBranchingFactor = 1.0;
      if(oTestGoal instanceof TestGoalGuardConditions) {
        TestGoalGuardConditions oGoalGuard = (TestGoalGuardConditions)oTestGoal;
        nBranchingFactor = 0.0;
        TCGNode oBranchingNode = (TCGNode)oGoalGuard.getElement();
       
        // collect branching factor of transition's target node
        if(oGoalGuard.getDNFToBeSatisfied().getConjunctions().isEmpty()) {
          List<TCGTransition> colTransitions = TCGTransitionHelperClass.findResultingTransitions(
              oBranchingNode, oGoalGuard.getEventToBeCalled(), null);
          if(!colTransitions.isEmpty()) {
            oBranchingNode = colTransitions.get(0).getTargetNode();
          }
          nBranchingFactor = getBranchingFactor(oBranchingNode);
        }
        else {
          for(TCGConjunction oConjunction : oGoalGuard.getDNFToBeSatisfied().getConjunctions()) {
            oBranchingNode = (TCGNode)oGoalGuard.getElement();
            List<TCGTransition> colTransitions = TCGTransitionHelperClass.findResultingTransitions(
                oBranchingNode, oGoalGuard.getEventToBeCalled(), oConjunction);
            if(!colTransitions.isEmpty()) {
              oBranchingNode = colTransitions.get(0).getTargetNode();
            }
            Double nBranching = getBranchingFactor(oBranchingNode);
            nBranchingFactor += nBranching;
          }
          nBranchingFactor /= Double.valueOf(
              (double)oGoalGuard.getDNFToBeSatisfied().getConjunctions().size());
        }
      }
      else {
        TCGNode oBranchingNode = (TCGNode)oTestGoal.getElement();
        nBranchingFactor = getBranchingFactor(oBranchingNode);
      }
      oTestGoal.setPriority(nBranchingFactor);
      colGoalsBranchingFactor.put(oTestGoal, nBranchingFactor);
    }
View Full Code Here

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

    }
   
    // select node from regions (no initial node)
    for(TestCaseRegion oRegion : in_oRuntimeState.getAllRegions())
    {
      TCGNode oNode = in_oRuntimeState.getActiveNode(oRegion);
      if((oNode instanceof TCGRealNode ||
          !((TCGIntermediateNode)oNode).getNodeType().equals(TCGNodeType.INITIAL))) {
        out_oSelectedNodeList.add(oNode);
      }
    }
View Full Code Here

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

              oTransition = (TCGTransition)oElement;
              oRegion = oTransition.getContainer();
            }
           
            // found matching region for expression           
            TCGNode oNewActiveNode = in_oRuntimeState.getActiveNode(oRegion);
           
            // is the found state included in the region of one active state or vice versa?
            for(TCGNode oActiveNode : in_oRuntimeState.getAllActiveNodes()) {
              if(oActiveNode instanceof TCGRealNode)
                if(TCGRegionHelperClass.regionsAreInHierarchicalOrder(
View Full Code Here

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

    {
      // since this test goal includes a subsequent execution of a transition
      // it is sufficient to check only the source states of all transitions
      for(TransitionInstance oTransitionInstance : in_oTestCase.getTransitionInstances())
      {
        TCGNode oNode = oTransitionInstance.getSourceNode();
        // oNode (source node of transition) has to be included in
        // getElement() (source node of the test goal) or be equal
        // alternative: the state of the test goal is contained in the
        // source node of the transition -> search for the last visited node
        // and compare!
View Full Code Here

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

  @Override
  public boolean checkSatisfactionByTransitionInstance(
      TransitionInstance in_oTransitionInstance) {
    // checks nodes if test goal is a node
    if(getElement() instanceof TCGNode) {
      TCGNode oNode = in_oTransitionInstance.getSourceNode();
      // oNode (source node of transition) has to be included in
      // getElement() (source node of the test goal) or be equal
      // alternative: the state of the test goal is contained in the
      // source node of the transition -> search for the last visited node
      // and compare!
View Full Code Here

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

  }

  @Override
  public TestCase createTestCase(TestCaseGraphHelper in_oTCGHelper)
  {
    TCGNode oNode = (TCGNode)getElement();

    TestCaseGeneratorRunner oRunner = new TestCaseGeneratorRunner(in_oTCGHelper);
    //oRunner.getRuntimeState().setActiveNode(oNode); // delayed until postfix determination
    oRunner.searchBackwardsFromNodeWithEventConditionConjunction(
        oNode, getEventToBeCalled(), getDNFToBeSatisfied(), true);
View Full Code Here

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

  //Amin Rezaee
  @Override
  public boolean checkSatisfactionOfTestGoalWithAbstractPath(
      LinkedList<Pair<TCGTransition, TCGNode>> in_oPath) {

    TCGNode oNode = (TCGNode)getElement();
    setTargetNode(oNode);
    setEventToBeTrigger(getEventToBeCalled());
    set_DNF(getDNFToBeSatisfied());
    set_bCreateConditionBasedTestGoal(true);
    ////////////
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.