use of gov.ca.cwds.authorizer.drools.configuration.ClientAbstractAuthorizationDroolsConfiguration in project api-core by ca-cwds.
the class ClientAuthorizationDrlTest method assertClientAccessMatrixValue.
private void assertClientAccessMatrixValue(ClientCondition condition, List<StaffPrivilegeType> privileges, boolean expectedResult) throws DroolsException {
ClientAbstractAuthorizationDroolsConfiguration droolsConfiguration = new ClientAbstractAuthorizationDroolsConfiguration();
List instances = new ArrayList<>();
instances.add(condition);
final boolean actualResult = droolsAuthorizationService.authorizeObjectOperation(privileges, droolsConfiguration, instances);
assertThat(actualResult, is(expectedResult));
}
use of gov.ca.cwds.authorizer.drools.configuration.ClientAbstractAuthorizationDroolsConfiguration in project api-core by ca-cwds.
the class ClientAbstractReadAuthorizerTest method init.
@Before
public void init() {
MockitoAnnotations.initMocks(this);
final DroolsService droolsService = new DroolsService();
final DroolsAuthorizationService droolsAuthorizationService = new DroolsAuthorizationService(droolsService);
final ClientAbstractAuthorizationDroolsConfiguration droolsConfiguration = new ClientAbstractAuthorizationDroolsConfiguration();
testSubject = new ClientAbstractReadAuthorizer(droolsAuthorizationService, droolsConfiguration);
testSubject.setSensitivityDeterminationService(clientSensitivityDeterminationService);
testSubject.setCountyDeterminationService(clientCountyDeterminationService);
}
Aggregations