use of org.apereo.cas.authentication.attribute.AttributeDefinition in project cas by apereo.
the class DefaultAttributeDefinitionStoreTests method verifyAttrDefnNotFound.
@Test
public void verifyAttrDefnNotFound() {
val service = CoreAuthenticationTestUtils.getRegisteredService();
val store = new DefaultAttributeDefinitionStore();
store.setScope("example.org");
val defn = DefaultAttributeDefinition.builder().key("eduPersonPrincipalName").attribute("invalid").scoped(true).build();
store.registerAttributeDefinition(defn);
var values = (Optional<Pair<AttributeDefinition, List<Object>>>) store.resolveAttributeValues("whatever", CollectionUtils.wrap(CoreAuthenticationTestUtils.CONST_USERNAME), service, Map.of());
assertTrue(values.isEmpty());
}
Aggregations