Skip to content

Commit

Permalink
Moved EML module files to new subdirectory.
Browse files Browse the repository at this point in the history
Now the main test directory contains only complete EML files.  Module level files should go into moduleEML, and will only be tested against the SAX parser, as they will no longer pass the test for EMLValidator.
  • Loading branch information
mbjones committed Jan 31, 2019
1 parent 5036bfa commit 85b8b8d
Show file tree
Hide file tree
Showing 25 changed files with 8 additions and 5 deletions.
Binary file modified lib/eml.jar
Binary file not shown.
13 changes: 8 additions & 5 deletions src/test/java/org/ecoinformatics/emltest/SaxValidateTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class SaxValidateTest extends TestCase
private final static String
DEFAULT_PARSER = "org.apache.xerces.parsers.SAXParser";
private final static String TEST_DIR = "./src/test/resources/";
private final static String MODULES_DIR = TEST_DIR + "/moduleEML/";

/**
* Constructor to build the test
Expand Down Expand Up @@ -91,8 +92,9 @@ public void testSchemaValid()
SAXValidate test = new SAXValidate(true);
assertTrue(test != null);

File testDir = new File(TEST_DIR);
Vector fileList = getXmlFiles(testDir);
Vector fileList = getXmlFiles(TEST_DIR);
Vector modsList = getXmlFiles(MODULES_DIR);
fileList.addAll(modsList);

for (int i=0; i<fileList.size(); i++) {
File testFile = (File)fileList.elementAt(i);
Expand Down Expand Up @@ -128,13 +130,14 @@ public static Test suite()
}

/**
* Get the list of files in a directory.
* Get the list of files in a directory with XML extensions.
*
* @param directory the directory to list
* @param dirname the directory to list
* @return a vector of File objects in the directory
*/
private Vector getXmlFiles(File directory)
private Vector getXmlFiles(String dirname)
{
File directory = new File(dirname);
String[] files = directory.list();
Vector fileList = new Vector();

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 85b8b8d

Please sign in to comment.