Package com.vividsolutions.jtstest.test

Examples of com.vividsolutions.jtstest.test.TestCaseList


   */
  private TestCaseEdit currTestCase;

  public void initTestCaseList()
  {
    tcList = new TestCaseList();
    tcListi = new IteratorWrapper(tcList.getList().listIterator());
    // ensure that there is always a valid TestCase in the list
    createNew();
  }
View Full Code Here


  {
    return tcList.getList().size();
  }
 
  public void openXmlFilesAndDirectories(File[] files) throws Exception {
     TestCaseList testCaseList = createTestCaseList(files);
    PrecisionModel precisionModel = new PrecisionModel();
    if (!testCaseList.getList().isEmpty()) {
      TestRunnerTestCaseAdapter a = (TestRunnerTestCaseAdapter) testCaseList.getList().get(0);
      precisionModel = a.getTestRunnerTestCase().getTestRun().getPrecisionModel();
    }
    if (tcList.getList().size() == 1
         && ((Testable) tcList.getList().get(0)).getGeometry(0) == null
         && ((Testable) tcList.getList().get(0)).getGeometry(1) == null) {
      loadTestCaseList(testCaseList, precisionModel);
    }
    else {
      TestCaseList newList = new TestCaseList();
      newList.add(tcList);
      newList.add(testCaseList);
      loadTestCaseList(newList, precisionModel);
    }
  }
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 {
          newTcl.add(new TestCaseEdit(tc));
        }

    }
    initList(newTcl);
  }
View Full Code Here

    }
    initList(newTcl);
  }

  private TestCaseList createTestCaseList(File[] filesAndDirectories) {
    TestCaseList testCaseList = new TestCaseList();
    for (int i = 0; i < filesAndDirectories.length; i++) {
      File fileOrDirectory = filesAndDirectories[i];
      if (fileOrDirectory.isFile()) {
        testCaseList.add(createTestCaseList(fileOrDirectory));
      }
      else if (fileOrDirectory.isDirectory()) {
        testCaseList.add(createTestCaseListFromDirectory(fileOrDirectory));
      }
    }
    return testCaseList;
  }
View Full Code Here

    return testCaseList;
  }

  private TestCaseList createTestCaseListFromDirectory(File directory) {
    Assert.isTrue(directory.isDirectory());
    TestCaseList testCaseList = new TestCaseList();
    List files = Arrays.asList(directory.listFiles());
    for (Iterator i = files.iterator(); i.hasNext(); ) {
      File file = (File) i.next();
      testCaseList.add(createTestCaseList(file));
    }
    return testCaseList;
  }
View Full Code Here

  {
    TestReader testReader = new TestReader();
    TestRun testRun = testReader.createTestRun(xmlTestFile, 1);
    parseErrors = testReader.getParsingProblems();

    TestCaseList tcl = new TestCaseList();
    if (hasParseErrors()) {
      return tcl;
    }
    for (Iterator i = testRun.getTestCases().iterator(); i.hasNext(); ) {
      com.vividsolutions.jtstest.testrunner.TestCase testCase = (com.vividsolutions.jtstest.testrunner.TestCase) i.next();
      tcl.add(new TestRunnerTestCaseAdapter(testCase));
    }
    return tcl;
  }
View Full Code Here

TOP

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

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.