use of org.orcid.core.exception.OrcidUnauthorizedException in project ORCID-Source by ORCID.
the class MemberV2ApiServiceDelegator_BiogrphyTest method testReadPublicScope_Biography.
@Test
public void testReadPublicScope_Biography() {
SecurityContextTestUtils.setUpSecurityContext(ORCID, ScopePathType.READ_PUBLIC);
Response r = serviceDelegator.viewBiography(ORCID);
assertNotNull(r);
assertEquals(Biography.class.getName(), r.getEntity().getClass().getName());
try {
// Bio for 0000-0000-0000-0002 should be limited
String otherOrcid = "0000-0000-0000-0002";
r = serviceDelegator.viewBiography(otherOrcid);
fail();
} catch (OrcidUnauthorizedException e) {
}
}
Aggregations