Search in sources :

Example 1 with AdminTokenAction

use of com.sun.identity.security.AdminTokenAction in project OpenAM by OpenRock.

the class XacmlServiceTest method setup.

@BeforeMethod
public void setup() throws Exception {
    this.importExport = mock(XACMLExportImport.class);
    this.debug = mock(Debug.class);
    this.adminTokenAction = mock(AdminTokenAction.class);
    doAnswer(ssoTokenAnswer).when(adminTokenAction).run();
    this.service = new XacmlServiceTestWrapper(importExport, adminTokenAction, this.debug, null, null, jacksonRepresentationFactory);
    this.request = mock(Request.class);
    doReturn(REQUEST_ATTRIBUTES).when(request).getAttributes();
    this.response = mock(Response.class);
    service.setRequest(request);
    service.setResponse(response);
    query = new Form();
    service = spy(service);
    doReturn(query).when(service).getQuery();
}
Also used : Response(org.restlet.Response) Form(org.restlet.data.Form) AdminTokenAction(com.sun.identity.security.AdminTokenAction) Request(org.restlet.Request) XACMLExportImport(com.sun.identity.entitlement.xacml3.XACMLExportImport) Debug(com.sun.identity.shared.debug.Debug) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

XACMLExportImport (com.sun.identity.entitlement.xacml3.XACMLExportImport)1 AdminTokenAction (com.sun.identity.security.AdminTokenAction)1 Debug (com.sun.identity.shared.debug.Debug)1 Request (org.restlet.Request)1 Response (org.restlet.Response)1 Form (org.restlet.data.Form)1 BeforeMethod (org.testng.annotations.BeforeMethod)1