Package org.xilaew.atg.model.tests

Examples of org.xilaew.atg.model.tests.FunctionCall


      }
      // Read Values from Solver and store in Model
      if (solved == SolveResult.Solved) {
        TestCase tc = factory.createTestCase();
        result.getTests().add(tc);
        FunctionCall func = factory.createFunctionCall();
        func.setName(tcgActivity.getName());
        func.setActivity(tcgActivity);
        tc.setFunction(func);
        for (TCGVariable var : tcgActivity.getVariables()) {
          Value v = factory.createValue();
          v.setName(var.getName());
          v.setVariable(var);
          if (var.isIsParameter()) {
            Double value = null;
            try {
              value = ampl.getParameter(var.getName());
            } catch (IOException e) {
             
              e.printStackTrace();
              continue;
            }
            v.setValue(value);
            switch (var.getUsage()) {
            case IN_PARAMETER:
              func.getParameters().add(v);
              break;
            case OUT_PARAMETER:
              tc.getTestForValue().add(v);
              break;
            case INOUT_PARAMETER:
View Full Code Here


    // Create one Testcase per Path
    for (Entry<Path,Witness> p : paths.entrySet()) {
      // Read Values from Solver and store in Model
      TestCase tc = factory.createTestCase();
      result.getTests().add(tc);
      FunctionCall func = factory.createFunctionCall();
      func.setName(tcgActivity.getName());
      func.setActivity(tcgActivity);
      tc.setFunction(func);
      for (TCGVariable var : tcgActivity.getVariables()) {
        Value v = factory.createValue();
        v.setName(var.getName());
        v.setVariable(var);
        if (var.isIsParameter()) {
          Double value = p.getValue().get(var).get(0);
          v.setValue(value);
          switch (var.getUsage()) {
          case IN_PARAMETER:
            func.getParameters().add(v);
            break;
          case OUT_PARAMETER:
            tc.getTestForValue().add(v);
            break;
          case INOUT_PARAMETER:
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetFunction(FunctionCall newFunction, NotificationChain msgs) {
    FunctionCall oldFunction = function;
    function = newFunction;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TestsPackage.TEST_CASE__FUNCTION, oldFunction, newFunction);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here

TOP

Related Classes of org.xilaew.atg.model.tests.FunctionCall

Copyright © 2018 www.massapicom. 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.