use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.
the class ApiSecurityTest method testArgUnauthorizedCompositeObject.
@Test(expected = UnauthorizedException.class)
public void testArgUnauthorizedCompositeObject() throws Exception {
CaseDTO caseDTO = new CaseDTO();
Case caseObject = new Case(2L, "name");
caseDTO.setCaseObject(caseObject);
testService.testCompositeObject(caseDTO);
}
use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.
the class ApiSecurityTest method testArgAuthorizedCompositeObject.
@Test
public void testArgAuthorizedCompositeObject() throws Exception {
CaseDTO caseDTO = new CaseDTO();
Case caseObject = new Case(1L, "name");
caseDTO.setCaseObject(caseObject);
testService.testCompositeObject(caseDTO);
}
use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.
the class TestServiceImpl method testFilter.
@Override
@Authorize("case:read:caseDTO.caseObject.id")
public List<CaseDTO> testFilter() {
List<CaseDTO> result = new ArrayList<>();
CaseDTO caseDTO = new CaseDTO();
caseDTO.setCaseObject(new Case(1L, "valid"));
result.add(caseDTO);
caseDTO = new CaseDTO();
caseDTO.setCaseObject(new Case(2L, "name"));
result.add(caseDTO);
return result;
}
use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.
the class ApiSecurityTest method testArgAuthorizedCompositeObjectList.
@Test
public void testArgAuthorizedCompositeObjectList() throws Exception {
CaseDTO caseDTO = new CaseDTO();
Case caseObject = new Case(1L, "name");
caseDTO.getCases().add(caseObject);
caseDTO.getCases().add(new Case(1L, "name"));
testService.testCompositeObjectList(caseDTO);
}
use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.
the class ApiSecurityTest method testArgUnauthorizedCompositeObjectList.
@Test(expected = UnauthorizedException.class)
public void testArgUnauthorizedCompositeObjectList() throws Exception {
CaseDTO caseDTO = new CaseDTO();
Case caseObject = new Case(1L, "name");
caseDTO.getCases().add(caseObject);
caseDTO.getCases().add(new Case(2L, "name"));
testService.testCompositeObjectList(caseDTO);
}