-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
issue #75: add tag local codelist for 852
- Loading branch information
Showing
3 changed files
with
92 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
24 changes: 24 additions & 0 deletions
24
src/test/java/de/gwdg/metadataqa/marc/definition/tags/bltags/Tag852Test.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,24 @@ | ||
package de.gwdg.metadataqa.marc.definition.tags.bltags; | ||
|
||
import de.gwdg.metadataqa.marc.DataField; | ||
import de.gwdg.metadataqa.marc.definition.MarcVersion; | ||
import de.gwdg.metadataqa.marc.definition.SubfieldDefinition; | ||
import de.gwdg.metadataqa.marc.definition.tags.tags84x.Tag852; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class Tag852Test extends BLTagTest { | ||
|
||
public Tag852Test() { | ||
super(Tag852.getInstance()); | ||
} | ||
|
||
@Test | ||
public void testValidFields() { | ||
SubfieldDefinition subfield = tag.getSubfield("a"); | ||
assertEquals(1, subfield.getLocalCodes().size()); | ||
assertEquals(32, subfield.getLocalCodes(MarcVersion.BL).size()); | ||
assertEquals("Bodleian Library", subfield.getLocalCode(MarcVersion.BL, "BODBL").getLabel()); | ||
} | ||
} |