Examples of GreedyTester


Examples of nz.ac.waikato.modeljunit.GreedyTester

    return (trafficFlowTimer > 0 && now >= trafficFlowTimer);
  }

  public static void main(String[] args)
  {
    Tester tester = new GreedyTester(new TrafficLightOld());
    tester.addListener("verbose");
    GraphListener graphListener = tester.buildGraph();
    try {
      graphListener.printGraphDot("OriginalTrafficLight.dot");
    }
    catch (Exception ex) {
      System.out.println(ex.getMessage());
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GreedyTester

        tester.addCoverageMetric(metric);
        return tester;
    }

    public Tester constructGreedyTester(Project project, CoverageMetric metric) {
        GreedyTester tester = new GreedyTester(loadModelClass(project));
        tester.addCoverageMetric(metric);
        return tester;
    }
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GreedyTester

    private Model loadModelClass(Project project) {
        return new Model(TestExeModel.createNewModelInstance(project));
    }

    private void setMaximumCoverage(Project project) {
        GreedyTester tester = new GreedyTester(loadModelClass(project));
        CoverageMetric metric = new TransitionCoverage();
        tester.addCoverageMetric(metric);
        int i = 1;
        while (metric.getMaximum() == -1) {
            tester.generate(i);
            i++;
        }
        mMaximum = metric.getMaximum();
    }
View Full Code Here

Examples of nz.ac.waikato.modeljunit.GreedyTester

  //@Action public void clear() {s1 = false; s2 = false;}

  /** An example of generating tests from this model. */
  public static void main(String[] args)
  {
    Tester tester = new GreedyTester(new SimpleSet());
    tester.addListener(new VerboseListener());
    tester.generate(100);
  }
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.