diff --git a/src/test/java/eu/dissco/core/translator/terms/specimen/SpecimenNameTest.java b/src/test/java/eu/dissco/core/translator/terms/specimen/SpecimenNameTest.java index d7d3876..8b60856 100644 --- a/src/test/java/eu/dissco/core/translator/terms/specimen/SpecimenNameTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/specimen/SpecimenNameTest.java @@ -36,6 +36,38 @@ void testRetrieve() { assertThat(result).isEqualTo(SPECIMEN_NAME); } + + @Test + void testRetrieveVernacular() { + // Given + var ds = new eu.dissco.core.translator.schema.DigitalSpecimen() + .withDwcIdentification(List.of( + new eu.dissco.core.translator.schema.Identifications() + .withDwcIdentificationVerificationStatus(Boolean.TRUE) + .withTaxonIdentifications( + List.of(new TaxonIdentification().withDwcVernacularName(SPECIMEN_NAME))) + )); + + // When + var result = specimenName.calculate(ds); + + // Then + assertThat(result).isEqualTo(SPECIMEN_NAME); + } + + @Test + void testRetrieveNoName() { + // Given + var ds = new eu.dissco.core.translator.schema.DigitalSpecimen() + .withDwcIdentification(List.of()); + + // When + var result = specimenName.calculate(ds); + + // Then + assertThat(result).isNull(); + } + @Test void testGetTerm() { // When diff --git a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinateSystemTest.java b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinateSystemTest.java index 22adf75..60f463a 100644 --- a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinateSystemTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinateSystemTest.java @@ -8,7 +8,7 @@ import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) -public class VerbatimCoordinateSystemTest { +class VerbatimCoordinateSystemTest { private static final String VERBATIM_COORDINATE_SYSTEM = "degrees decimal minutes"; diff --git a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinatesTest.java b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinatesTest.java index 52045e0..0f1cb9f 100644 --- a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinatesTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimCoordinatesTest.java @@ -8,7 +8,7 @@ import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) -public class VerbatimCoordinatesTest { +class VerbatimCoordinatesTest { private static final String VERBATIM_COORDINATES = "41 05 54S 121 05 34W"; diff --git a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLatitudeTest.java b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLatitudeTest.java index 9bec784..7c41264 100644 --- a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLatitudeTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLatitudeTest.java @@ -8,7 +8,7 @@ import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) -public class VerbatimLatitudeTest { +class VerbatimLatitudeTest { private static final String VERBATIM_LATITUDE = "41 05 54.03S"; diff --git a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLongitudeTest.java b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLongitudeTest.java index e57e5e8..7ef3179 100644 --- a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLongitudeTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimLongitudeTest.java @@ -8,7 +8,7 @@ import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) -public class VerbatimLongitudeTest { +class VerbatimLongitudeTest { private static final String VERBATIM_LONGITUDE = "121d 10' 34\" W"; diff --git a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimSRSTest.java b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimSRSTest.java index dfd5a45..ad1e1bc 100644 --- a/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimSRSTest.java +++ b/src/test/java/eu/dissco/core/translator/terms/specimen/location/georeference/VerbatimSRSTest.java @@ -8,7 +8,7 @@ import org.mockito.junit.jupiter.MockitoExtension; @ExtendWith(MockitoExtension.class) -public class VerbatimSRSTest { +class VerbatimSRSTest { private static final String VERBATIM_SRS = "NAD27";