Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro committed Jul 1, 2024
1 parent a03964b commit 96977df
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,21 +229,25 @@ private Item createActivity(ItemType actType, String actName, String doi1, Strin
}
item.setActionType(ActionType.CREATE);
Map<String, Object> additionalInfo = new HashMap<String, Object>();
List<Map> extIds = new ArrayList<>();
if (doi1 != null && issn1 != null) {
ExternalIDs extIds = new ExternalIDs();
ExternalID extId1 = new ExternalID();
extId1.setRelationship(Relationship.SELF);
extId1.setType("doi");
extId1.setValue(doi1);
extIds.getExternalIdentifier().add(extId1);

ExternalID extId2 = new ExternalID();
extId2.setRelationship(Relationship.SELF);
extId2.setType("issn");
extId2.setValue(issn1);
extIds.getExternalIdentifier().add(extId2);

additionalInfo.put("external_identifiers", extIds);
Map<String, String> map1 = new HashMap<>();
map1.put("type", "doi");
map1.put("value", doi1);
map1.put("relationship", Relationship.SELF.name());
extIds.add(map1);

Map<String, Object> map2 = new HashMap<>();
map2.put("type", "doi");
Map<String, String> urlMap = new HashMap<>();
urlMap.put("value", "https://doi.org/100/100");
map2.put("url", urlMap);
map2.put("relationship", Relationship.SELF.name());
extIds.add(map2);

Map<String, Object> extIdsMap = new HashMap<>();
extIdsMap.put("externalIdentifier", extIds);
additionalInfo.put("external_identifiers", extIdsMap);
} else if (dept != null && org != null) {
additionalInfo.put("department", dept);
additionalInfo.put("org_name", org);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h3 style="font-size: 18px;font-weight: bold;">
</div>
<div>
<ul style="padding-left: 0;margin-top: 2px;">
<li>work-1 doi: doi01 (2014-07-12)</li>
<li>work-1 doi: doi01 (2014-07-12)<ul><li style="padding-left: 0;margin-top: 2px;">doi: doi01</li><li style="padding-left: 0;margin-top: 2px;">doi: <a style="text-decoration: underline;color: #085c77;" target="_blank" href="https://doi.org/100/100">https://doi.org/100/100</a></li></ul></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ORCID would like to let you know
MORE INFO: https://testserver.orcid.org/inbox#3
EducationNew items added: * <i>org name</i> education-1 (2014-07-12)

WorksNew items added: * work-1 doi: doi01 (2014-07-12)
WorksNew items added: * work-1 doi: doi01 (2014-07-12)<ul><li style="padding-left: 0;margin-top: 2px;">doi: doi01</li><li style="padding-left: 0;margin-top: 2px;">doi: <a style="text-decoration: underline;color: #085c77;" target="_blank" href="https://doi.org/100/100">https://doi.org/100/100</a></li></ul>


Why did I get this email?
Expand Down

0 comments on commit 96977df

Please sign in to comment.