Search in sources :

Example 6 with CaseDTO

use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.

the class TestServiceImpl method testReturnProtectedInstance.

@Override
@Authorize("case:read:caseDTO.caseObject.id")
public CaseDTO testReturnProtectedInstance() {
    Case caseObject = new Case(2L, "");
    CaseDTO caseDTO = new CaseDTO();
    caseDTO.setCaseObject(caseObject);
    return caseDTO;
}
Also used : CaseDTO(gov.ca.cwds.testapp.domain.CaseDTO) Case(gov.ca.cwds.testapp.domain.Case) Authorize(gov.ca.cwds.security.annotations.Authorize)

Example 7 with CaseDTO

use of gov.ca.cwds.testapp.domain.CaseDTO in project perry by ca-cwds.

the class TestServiceImpl method testReturnInstance.

@Override
@Authorize("case:read:caseDTO.caseObject")
public CaseDTO testReturnInstance() {
    Case caseObject = new Case(1L, "");
    CaseDTO caseDTO = new CaseDTO();
    caseDTO.setCaseObject(caseObject);
    return caseDTO;
}
Also used : CaseDTO(gov.ca.cwds.testapp.domain.CaseDTO) Case(gov.ca.cwds.testapp.domain.Case) Authorize(gov.ca.cwds.security.annotations.Authorize)

Aggregations

Case (gov.ca.cwds.testapp.domain.Case)7 CaseDTO (gov.ca.cwds.testapp.domain.CaseDTO)7 Test (org.junit.Test)4 Authorize (gov.ca.cwds.security.annotations.Authorize)3 ArrayList (java.util.ArrayList)1