use of uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate in project Gaffer by gchq.
the class NamedOperationDetailTest method shouldConfigureCustomReadAccessPredicateWhenSpecified.
@Test
public void shouldConfigureCustomReadAccessPredicateWhenSpecified() {
final AccessPredicate customAccessPredicate = new AccessPredicate(new CustomUserPredicate());
final NamedOperationDetail namedOperationDetail = getBaseNamedOperationDetailBuilder().readAccessPredicate(customAccessPredicate).build();
assertEquals(customAccessPredicate, namedOperationDetail.getReadAccessPredicate());
}
use of uk.gov.gchq.gaffer.access.predicate.user.CustomUserPredicate in project Gaffer by gchq.
the class NamedOperationDetailTest method shouldConfigureCustomWriteAccessPredicateWhenSpecified.
@Test
public void shouldConfigureCustomWriteAccessPredicateWhenSpecified() {
final AccessPredicate customAccessPredicate = new AccessPredicate(new CustomUserPredicate());
final NamedOperationDetail namedOperationDetail = getBaseNamedOperationDetailBuilder().writeAccessPredicate(customAccessPredicate).build();
assertEquals(customAccessPredicate, namedOperationDetail.getWriteAccessPredicate());
}
Aggregations