Package com.vividsolutions.jtstest.test

Examples of com.vividsolutions.jtstest.test.Testable


    }

    public void populateList() {
        listModel.clear();
        for (Iterator i = testBuilderFrame.getModel().getTestCases().iterator(); i.hasNext();) {
            Testable testCase = (Testable) i.next();
            listModel.addElement(testCase);
        }
    }
View Full Code Here


    }

    void runAllTestsButton_actionPerformed(ActionEvent e) {
        try {
            for (Iterator i = testBuilderFrame.getModel().getTestCases().iterator(); i.hasNext();) {
                Testable testCase = (Testable) i.next();
                if (testCase.getWellKnownText(0) != null && testCase.getWellKnownText(1) != null) {
                    testCase.runTest();
                }
            }
            testBuilderFrame.testCasePanel.relatePanel.runTests();
            list.repaint();
        } catch (Exception x) {
View Full Code Here

            JList list,
            Object value,
            int index,
            boolean isSelected,
            boolean cellHasFocus) {
            Testable testCase = (Testable) value;
            String name = testCase.getName();
            if ((name == null || name.length() == 0) && testCase instanceof TestCaseEdit) {
                name = ((TestCaseEdit) testCase).getDescription();
            }
            if (name == null || name.length() == 0) {
                name = "Test";
            }
            setText(name);
            setIcon(testCase.isPassed() ? tickIcon : (testCase.isFailed() ? crossIcon : clearIcon));
            if (isSelected) {
                setBackground(list.getSelectionBackground());
                setForeground(list.getSelectionForeground());
            } else {
                setBackground(list.getBackground());
View Full Code Here

      String runDescription = (String) i.next();
      runSkey++;
      List testables = (List) runMap.get(runDescription);
      int caseSkey = 0;
      for (Iterator m = testables.iterator(); m.hasNext(); ) {
        Testable testable = (Testable) m.next();
        caseSkey++;
        if (busyDialog != null) {
          busyDialog.setDescription("Saving .html and .gif files: " + caseSkey
               + " of " + testCaseList.getList().size() + " tests");
        }
View Full Code Here

  private MapAndList runMapAndRuns(TestCaseList testCaseList) {
    Map runMap = new TreeMap();
    List runs = new ArrayList();
    for (Iterator i = testCaseList.getList().iterator(); i.hasNext(); ) {
      TestCaseEdit testCaseEdit = (TestCaseEdit) i.next();
      Testable testable = testCaseEdit.getTestable();
      if (testable instanceof TestRunnerTestCaseAdapter) {
        com.vividsolutions.jtstest.testrunner.TestCase testRunnerTestCase = ((TestRunnerTestCaseAdapter) testable).getTestRunnerTestCase();
        String runDescription = testRunnerTestCase.getTestRun().getTestFile().getName();
        runDescription = runDescription.indexOf(".") > -1 ? runDescription.substring(0, runDescription.indexOf(".")) : runDescription;
        addToListMapAndList(runDescription, testCaseEdit, runMap, runs);
View Full Code Here

      runSkey++;
      html += "        if (selectedCode == 'Run" + runSkey + "') {" + StringUtil.newLine;
      List testables = (List) runMap.get(runDescription);
      int caseSkey = 0;
      for (Iterator m = testables.iterator(); m.hasNext(); ) {
        Testable testable = (Testable) m.next();
        caseSkey++;
        html += "              document.main_form.test_combo.length = " + caseSkey + ";" + StringUtil.newLine;
        html += "              document.main_form.test_combo.options[" + (caseSkey - 1) + "].text  = \"" + StringUtil.escapeHTML(testName(testable, caseSkey)) + "\";" + StringUtil.newLine;
        html += "              document.main_form.test_combo.options[" + (caseSkey - 1) + "].value  = 'Run" + runSkey + "Case" + caseSkey + ".html';" + StringUtil.newLine;
      }
      html += "        LoadDetailFrame();";
      html += "  }";
    }
    html += "  }" + StringUtil.newLine
         + "</script>" + StringUtil.newLine
         + "</HEAD>" + StringUtil.newLine
         + "<BODY>" + StringUtil.newLine
         + "<h1>JTS Validation Suite</h1>" + StringUtil.newLine
         + htmlTitle(precisionModel)
         + "<p>" + StringUtil.newLine
         + "<FORM id=\"main_form\" name=\"main_form\">" + StringUtil.newLine;

    html += "<select id=run_combo name=run_combo size='1' style='width:30%' onChange='onRunChange()'>" + StringUtil.newLine;
    runSkey = 0;
    for (Iterator j = runs.iterator(); j.hasNext(); ) {
      String runDescription = (String) j.next();
      runSkey++;
      html += "<OPTION VALUE='Run" + runSkey + "'>"
           + StringUtil.escapeHTML(runName(runDescription, runSkey))
           + "</OPTION>" + StringUtil.newLine;
    }
    html += "</select>" + StringUtil.newLine;

    html += "<select id=test_combo name=test_combo size='1' style='width:60%' onChange='LoadDetailFrame()'>" + StringUtil.newLine;
    String runDescription = (String) runs.iterator().next();
    List testables = (List) runMap.get(runDescription);
    int caseSkey = 0;
    for (Iterator m = testables.iterator(); m.hasNext(); ) {
      Testable testable = (Testable) m.next();
      caseSkey++;
      html += "<OPTION VALUE='Run1Case" + caseSkey + ".html'>"
           + StringUtil.escapeHTML(testName(testable, caseSkey))
           + "</OPTION>" + StringUtil.newLine;
    }
View Full Code Here

    public void populateList() {
        listModel.clear();
        for (Iterator i = JTSTestBuilderFrame.instance().getModel().getTestCases().iterator();
            i.hasNext();
            ) {
            Testable testCase = (Testable) i.next();
            listModel.addElement(testCase);
        }
    }
View Full Code Here

            JList list,
            Object value,
            int index,
            boolean isSelected,
            boolean cellHasFocus) {
            Testable testCase = (Testable) value;
            setText(testName(testCase));
            setOpaque(true);
            setIcon(testCase.isPassed() ? tickIcon : (testCase.isFailed() ? crossIcon : clearIcon));
            if (isSelected) {
                setBackground(list.getSelectionBackground());
                setForeground(list.getSelectionForeground());
            } else {
                setBackground(list.getBackground());
View Full Code Here

  public void loadEditList(TestCaseList tcl)
  throws ParseException
  {
    TestCaseList newTcl = new TestCaseList();
    for (Iterator i = tcl.getList().iterator(); i.hasNext(); ) {
      Testable tc = (Testable) i.next();

        if (tc instanceof TestCaseEdit) {
          newTcl.add((TestCaseEdit) tc);
        }
        else {
View Full Code Here

 
  private void saveWKTBeforePMChange() {
    wktABeforePMChange.clear();
    wktBBeforePMChange.clear();
    for (Iterator i = getTestCaseList().getList().iterator(); i.hasNext(); ) {
      Testable testable = (Testable) i.next();
      Geometry a = testable.getGeometry(0);
      Geometry b = testable.getGeometry(1);
      wktABeforePMChange.add(a != null ? a.toText() : null);
      wktBBeforePMChange.add(b != null ? b.toText() : null);
    }
  }
View Full Code Here

TOP

Related Classes of com.vividsolutions.jtstest.test.Testable

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.