use of gov.ca.cwds.authorizer.StaffPrivilegeType in project api-core by ca-cwds.
the class StaffPrivilegeUtilTest method toStaffPersonPrivilegeTypes_success_whenStateSensitive.
@Test
public void toStaffPersonPrivilegeTypes_success_whenStateSensitive() {
// given
final PerryAccount input = initPerryAccountWithPrivileges("Sensitive Persons");
input.setCountyName("State of California");
// when
final Set<StaffPrivilegeType> actual = StaffPrivilegeUtil.toStaffPersonPrivilegeTypes(input);
// then
assertThat(actual.size(), is(1));
assertThat(actual, contains(STATE_SENSITIVE));
}
use of gov.ca.cwds.authorizer.StaffPrivilegeType in project api-core by ca-cwds.
the class StaffPrivilegeUtilTest method toStaffPersonPrivilegeTypes_success_whenCountySensitive.
@Test
public void toStaffPersonPrivilegeTypes_success_whenCountySensitive() {
// given
final PerryAccount input = initPerryAccountWithPrivileges("Sensitive Persons");
// when
final Set<StaffPrivilegeType> actual = StaffPrivilegeUtil.toStaffPersonPrivilegeTypes(input);
// then
assertThat(actual.size(), is(1));
assertThat(actual, contains(COUNTY_SENSITIVE));
}
use of gov.ca.cwds.authorizer.StaffPrivilegeType in project api-core by ca-cwds.
the class StaffPrivilegeUtilTest method toStaffPersonPrivilegeTypes_empty_whenUnknownPerryPrivileges.
@Test
public void toStaffPersonPrivilegeTypes_empty_whenUnknownPerryPrivileges() {
// given
final PerryAccount input = initPerryAccountWithPrivileges("a", "bbb");
// when
final Set<StaffPrivilegeType> actual = StaffPrivilegeUtil.toStaffPersonPrivilegeTypes(input);
// then
assertThat(actual.isEmpty(), is(true));
}
use of gov.ca.cwds.authorizer.StaffPrivilegeType in project api-core by ca-cwds.
the class StaffPrivilegeUtilTest method toStaffPersonPrivilegeTypes_success_whenSocialWorker.
@Test
public void toStaffPersonPrivilegeTypes_success_whenSocialWorker() {
// given
final PerryAccount input = initPerryAccountWithPrivileges("CWS Case Management System");
// when
final Set<StaffPrivilegeType> actual = StaffPrivilegeUtil.toStaffPersonPrivilegeTypes(input);
// then
assertThat(actual.size(), is(1));
assertThat(actual, contains(SOCIAL_WORKER_ONLY));
}
use of gov.ca.cwds.authorizer.StaffPrivilegeType in project api-core by ca-cwds.
the class StaffPrivilegeUtilTest method toStaffPersonPrivilegeTypes_success_whenCountySealed.
@Test
public void toStaffPersonPrivilegeTypes_success_whenCountySealed() {
// given
final PerryAccount input = initPerryAccountWithPrivileges("Sealed");
// when
final Set<StaffPrivilegeType> actual = StaffPrivilegeUtil.toStaffPersonPrivilegeTypes(input);
// then
assertThat(actual.size(), is(1));
assertThat(actual, contains(COUNTY_SEALED));
}
Aggregations