From b2da56294798fe3b459d20f69745d75cca9af510 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Fri, 11 Oct 2024 20:59:31 +0300 Subject: [PATCH] add verification assertions --- .../org/orcid/core/adapter/v3/JpaJaxbEmailAdapterTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/orcid-core/src/test/java/org/orcid/core/adapter/v3/JpaJaxbEmailAdapterTest.java b/orcid-core/src/test/java/org/orcid/core/adapter/v3/JpaJaxbEmailAdapterTest.java index 6fb86a0a529..65a70e2e6ac 100644 --- a/orcid-core/src/test/java/org/orcid/core/adapter/v3/JpaJaxbEmailAdapterTest.java +++ b/orcid-core/src/test/java/org/orcid/core/adapter/v3/JpaJaxbEmailAdapterTest.java @@ -101,6 +101,7 @@ public void testEmailToEmailEntity() throws JAXBException { assertNotNull(entity); assertNull(entity.getDateCreated()); assertNull(entity.getLastModified()); + assertNull(entity.getDateVerified()); assertEquals("user1@email.com", entity.getEmail()); assertEquals(org.orcid.jaxb.model.common_v2.Visibility.PUBLIC.name(), entity.getVisibility()); @@ -119,6 +120,8 @@ public void testEmailEntityToEmail() throws IllegalAccessException { assertEquals(DateUtils.convertToDate("2015-06-05T10:15:20"), DateUtils.convertToDate(email.getCreatedDate().getValue())); assertNotNull(email.getLastModifiedDate()); assertEquals(DateUtils.convertToDate("2015-06-05T10:15:20"), DateUtils.convertToDate(email.getLastModifiedDate().getValue())); + assertNotNull(email.getVerificationDate()); + assertEquals(DateUtils.convertToDate("2015-06-05T10:15:20"), DateUtils.convertToDate(email.getVerificationDate().getValue())); assertEquals("email@test.orcid.org", email.getEmail()); assertEquals(Visibility.PRIVATE, email.getVisibility()); @@ -159,6 +162,7 @@ private EmailEntity getEmailEntity() throws IllegalAccessException { Date date = DateUtils.convertToDate("2015-06-05T10:15:20"); EmailEntity result = new EmailEntity(); DateFieldsOnBaseEntityUtils.setDateFields(result, date); + result.setDateVerified(date); result.setEmail("email@test.orcid.org"); result.setCurrent(true); result.setPrimary(true);