-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from harvard-lts/dev
merge with harvard 1.5.0 release
- Loading branch information
Showing
19 changed files
with
523 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
/javadoc/ | ||
/target/ | ||
/version.properties | ||
/temp/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.release=disabled | ||
org.eclipse.jdt.core.compiler.source=1.7 | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<installed facet="jst.utility" version="1.0"/> | ||
<installed facet="java" version="1.7"/> | ||
<installed facet="java" version="1.8"/> | ||
</faceted-project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/* | ||
* Copyright 2009 Harvard University Library | ||
* | ||
* This file is part of FITS (File Information Tool Set). | ||
* | ||
* FITS is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* FITS is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with FITS. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package edu.harvard.hul.ois.fits.junit; | ||
|
||
import java.io.File; | ||
|
||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import edu.harvard.hul.ois.fits.Fits; | ||
import edu.harvard.hul.ois.fits.FitsOutput; | ||
import edu.harvard.hul.ois.fits.tests.AbstractLoggingTest; | ||
|
||
|
||
public class ADLTest extends AbstractLoggingTest { | ||
|
||
/* | ||
* Only one Fits instance is needed to run all tests. | ||
* This also speeds up the tests. | ||
*/ | ||
private static Fits fits; | ||
|
||
@BeforeClass | ||
public static void beforeClass() throws Exception { | ||
// Set up FITS for entire class. | ||
File fitsConfigFile = new File("testfiles/properties/fits-full-with-tool-output.xml"); | ||
fits = new Fits(null, fitsConfigFile); | ||
} | ||
|
||
@AfterClass | ||
public static void afterClass() { | ||
fits = null; | ||
} | ||
|
||
@Test | ||
public void testADL() throws Exception { | ||
|
||
String inputFilename = "T-350_036_Archival_Side_1.adl"; | ||
File input = new File("testfiles/" + inputFilename); | ||
FitsOutput fitsOut = fits.examine(input); | ||
fitsOut.addStandardCombinedFormat(); | ||
fitsOut.saveToDisk("test-generated-output/" + inputFilename + OUTPUT_FILE_SUFFIX); | ||
} | ||
|
||
} |
76 changes: 76 additions & 0 deletions
76
src/test/java/edu/harvard/hul/ois/fits/junit/ADLXmlUnitTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright 2009 Harvard University Library | ||
* | ||
* This file is part of FITS (File Information Tool Set). | ||
* | ||
* FITS is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* FITS is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with FITS. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package edu.harvard.hul.ois.fits.junit; | ||
|
||
import java.io.File; | ||
import java.util.Scanner; | ||
|
||
import org.jdom.output.Format; | ||
import org.jdom.output.XMLOutputter; | ||
import org.junit.AfterClass; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import edu.harvard.hul.ois.fits.Fits; | ||
import edu.harvard.hul.ois.fits.FitsOutput; | ||
import edu.harvard.hul.ois.fits.tests.AbstractXmlUnitTest; | ||
|
||
|
||
public class ADLXmlUnitTest extends AbstractXmlUnitTest { | ||
|
||
/* | ||
* Only one Fits instance is needed to run all tests. | ||
* This also speeds up the tests. | ||
*/ | ||
private static Fits fits; | ||
|
||
@BeforeClass | ||
public static void beforeClass() throws Exception { | ||
// Set up FITS for entire class. | ||
fits = new Fits(); | ||
} | ||
|
||
@AfterClass | ||
public static void afterClass() { | ||
fits = null; | ||
} | ||
|
||
@Test | ||
public void testADL() throws Exception { | ||
|
||
String inputFilename = "T-350_036_Archival_Side_1.adl"; | ||
File input = new File("testfiles/" + inputFilename); | ||
FitsOutput fitsOut = fits.examine(input); | ||
fitsOut.addStandardCombinedFormat(); | ||
fitsOut.saveToDisk("test-generated-output/" + inputFilename + ACTUAL_OUTPUT_FILE_SUFFIX); | ||
|
||
XMLOutputter serializer = new XMLOutputter(Format.getPrettyFormat()); | ||
String actualXmlStr = serializer.outputString(fitsOut.getFitsXml()); | ||
|
||
// Read in the expected XML file | ||
Scanner scan = new Scanner(new File( | ||
"testfiles/output/" + inputFilename + EXPECTED_OUTPUT_FILE_SUFFIX)); | ||
String expectedXmlStr = scan. | ||
useDelimiter("\\Z").next(); | ||
scan.close(); | ||
|
||
testActualAgainstExpected(actualXmlStr, expectedXmlStr, inputFilename); | ||
} | ||
|
||
} |
Oops, something went wrong.