use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getFundingWithoutContributors.
private Funding getFundingWithoutContributors() {
Funding funding = new Funding();
FundingTitle fundingTitle = new FundingTitle();
fundingTitle.setTitle(new Title("funding without contributors"));
funding.setTitle(fundingTitle);
return funding;
}
use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.
the class ContributorUtilsTest method getWorkWithContributorWithoutOrcid.
private Work getWorkWithContributorWithoutOrcid() {
Work work = new Work();
WorkTitle workTitle = new WorkTitle();
workTitle.setTitle(new Title("work with contributor without ORCID record"));
work.setWorkTitle(workTitle);
work.setWorkContributors(getWorkContributorWithoutOrcid());
return work;
}
use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.
the class SourceInActivitiesTest method getWorkWithoutExternalIdentifier.
private Work getWorkWithoutExternalIdentifier(String userOrcid, boolean validate) {
Work work = new Work();
WorkTitle title = new WorkTitle();
title.setTitle(new Title("Work " + System.currentTimeMillis()));
work.setWorkTitle(title);
work.setWorkType(org.orcid.jaxb.model.record_v2.WorkType.BOOK);
work = workManager.createWork(userOrcid, work, validate);
return workManager.getWork(userOrcid, work.getPutCode());
}
use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.
the class SourceInActivitiesTest method getWorkWithPutCode.
private Work getWorkWithPutCode(String userOrcid, boolean validate) {
Work work = new Work();
WorkTitle title = new WorkTitle();
title.setTitle(new Title("Work " + System.currentTimeMillis()));
work.setWorkTitle(title);
ExternalID extId = new ExternalID();
extId.setValue("111");
extId.setType(WorkExternalIdentifierType.DOI.value());
ExternalIDs extIdentifiers = new ExternalIDs();
extIdentifiers.getExternalIdentifier().add(extId);
work.setWorkExternalIdentifiers(extIdentifiers);
work.setWorkType(org.orcid.jaxb.model.record_v2.WorkType.BOOK);
work.setPutCode(Long.valueOf(111));
work = workManager.createWork(userOrcid, work, validate);
return workManager.getWork(userOrcid, work.getPutCode());
}
use of com.adobe.cq.wcm.core.components.it.seljup.util.components.title.v1.Title in project ORCID-Source by ORCID.
the class v2ClientPerMessageCacheTest method before.
@Before
public void before() {
MockitoAnnotations.initMocks(this);
TargetProxyHelper.injectIntoProxy(orcid20ApiClient, "jerseyClient", mock_jerseyClient);
// mock methods
when(mock_jerseyClient.resource(Matchers.isA(URI.class))).thenReturn(mock_resource);
when(mock_resource.path(Matchers.anyString())).thenReturn(mock_resource);
when(mock_resource.accept(Matchers.anyString())).thenReturn(mock_builder);
when(mock_builder.get(Matchers.isA(Class.class))).thenReturn(mock_response);
when(mock_builder.header(Matchers.anyString(), Matchers.anyString())).thenReturn(mock_builder);
when(mock_response.getStatus()).thenReturn(200);
when(mock_response.getEntity(Record.class)).thenReturn(record);
// build test record
record.setOrcidIdentifier(new OrcidIdentifier("http://orcid.org/0000-0000-0000-0000"));
ActivitiesSummary sum = new ActivitiesSummary();
Works works = new Works();
WorkGroup group = new WorkGroup();
WorkSummary work = new WorkSummary();
WorkTitle title = new WorkTitle();
title.setTitle(new Title("blah"));
work.setTitle(title);
group.getWorkSummary().add(work);
works.getWorkGroup().add(group);
sum.setWorks(works);
record.setActivitiesSummary(sum);
}
Aggregations