Search in sources :

Example 1 with AuthorizationService

use of org.glassfish.security.services.api.authorization.AuthorizationService in project Payara by payara.

the class CreateJavaMailResourceTest method setUp.

@Before
public void setUp() {
    System.out.println("\n\n *** Entering setup method *** \n\n");
    System.out.println("Current dir: " + System.getProperty("user.dir") + "\n");
    AuthorizationService foo = new AuthorizationServiceImpl();
    System.out.println("Direct instantiation: " + foo);
    habitat = getHabitat();
    foo = habitat.getService(AuthorizationService.class);
    System.out.println("Lookup via habitat: " + foo + "\n");
    resources = habitat.<Domain>getService(Domain.class).getResources();
    assertTrue(resources != null);
    parameters = new ParameterMap();
    context = new AdminCommandContextImpl(getLogger(CreateJavaMailResourceTest.class, ADMIN_LOGGER), new PropsFileActionReporter());
    cr = habitat.getService(CommandRunner.class);
    assertTrue(cr != null);
}
Also used : AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) AuthorizationService(org.glassfish.security.services.api.authorization.AuthorizationService) ParameterMap(org.glassfish.api.admin.ParameterMap) Domain(com.sun.enterprise.config.serverbeans.Domain) PropsFileActionReporter(com.sun.enterprise.v3.common.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) AuthorizationServiceImpl(org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl) Before(org.junit.Before)

Aggregations

Domain (com.sun.enterprise.config.serverbeans.Domain)1 PropsFileActionReporter (com.sun.enterprise.v3.common.PropsFileActionReporter)1 AdminCommandContextImpl (org.glassfish.api.admin.AdminCommandContextImpl)1 CommandRunner (org.glassfish.api.admin.CommandRunner)1 ParameterMap (org.glassfish.api.admin.ParameterMap)1 AuthorizationService (org.glassfish.security.services.api.authorization.AuthorizationService)1 AuthorizationServiceImpl (org.glassfish.security.services.impl.authorization.AuthorizationServiceImpl)1 Before (org.junit.Before)1