-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for existing basic validation done when using ArchiveFactory.
Then (regarding #43) we can move this out of ArchiveFactory.
- Loading branch information
1 parent
c6c8f68
commit 1271de4
Showing
17 changed files
with
177 additions
and
2 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
Empty file.
Empty file.
20 changes: 20 additions & 0 deletions
20
src/test/resources/invalid/extension-core-id-missing/meta.xml
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,20 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
|
||
<extension encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.gbif.org/terms/1.0/Multimedia"> | ||
<files> | ||
<location>media.txt</location> | ||
</files> | ||
<coreid index="0"/> | ||
<field index="1" term="http://purl.org/dc/terms/identifier"/> | ||
<field default="StillImage" term="http://purl.org/dc/terms/type"/> | ||
</extension> | ||
</archive> |
Empty file.
20 changes: 20 additions & 0 deletions
20
src/test/resources/invalid/extension-encoding-missing/meta.xml
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,20 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
|
||
<extension fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.gbif.org/terms/1.0/Multimedia"> | ||
<files> | ||
<location>media.txt</location> | ||
</files> | ||
<coreid index="0"/> | ||
<field index="1" term="http://purl.org/dc/terms/identifier"/> | ||
<field default="StillImage" term="http://purl.org/dc/terms/type"/> | ||
</extension> | ||
</archive> |
Empty file.
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,19 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
|
||
<extension encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.gbif.org/terms/1.0/Multimedia"> | ||
<files> | ||
<location>media.txt</location> | ||
</files> | ||
<coreid index="0"/> | ||
<field index="1" term="http://purl.org/dc/terms/identifier"/> | ||
<field default="StillImage" term="http://purl.org/dc/terms/type"/> | ||
</extension> | ||
</archive> |
Empty file.
19 changes: 19 additions & 0 deletions
19
src/test/resources/invalid/extension-location-missing/meta.xml
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,19 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
|
||
<extension encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.gbif.org/terms/1.0/Multimedia"> | ||
<files> | ||
</files> | ||
<coreid index="0"/> | ||
<field index="1" term="http://purl.org/dc/terms/identifier"/> | ||
<field default="StillImage" term="http://purl.org/dc/terms/type"/> | ||
</extension> | ||
</archive> |
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,20 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
|
||
<extension encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.gbif.org/terms/1.0/Multimedia"> | ||
<files> | ||
<location>media.txt</location> | ||
</files> | ||
<coreid index="0"/> | ||
<field index="1" term="http://purl.org/dc/terms/identifier"/> | ||
<field default="StillImage" term="http://purl.org/dc/terms/type"/> | ||
</extension> | ||
</archive> |
11 changes: 11 additions & 0 deletions
11
src/test/resources/invalid/meta-file-encoding-missing/meta.xml
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,11 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
</archive> |
Empty file.
10 changes: 10 additions & 0 deletions
10
src/test/resources/invalid/meta-file-location-missing/meta.xml
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,10 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
<field index="2" term="http://rs.tdwg.org/dwc/terms/taxonRank"/> | ||
</core> | ||
</archive> |
Empty file.
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,10 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<archive xmlns="http://rs.tdwg.org/dwc/text/"> | ||
<core encoding="UTF-8" fieldsTerminatedBy="\t" linesTerminatedBy="\n" fieldsEnclosedBy='' ignoreHeaderLines="1" rowType="http://rs.tdwg.org/dwc/terms/Taxon"> | ||
<files> | ||
<location>taxa.txt</location> | ||
</files> | ||
<id index="0"/> | ||
<field index="1" term="http://rs.tdwg.org/dwc/terms/scientificName"/> | ||
</core> | ||
</archive> |