Search in sources :

Example 21 with AdminCommandContextImpl

use of org.glassfish.api.admin.AdminCommandContextImpl in project Payara by payara.

the class ListJavaMailResourcesTest method setUp.

@Before
public void setUp() {
    habitat = getHabitat();
    parameters = new ParameterMap();
    cr = habitat.getService(CommandRunner.class);
    assertTrue(cr != null);
    Resources resources = habitat.<Domain>getService(Domain.class).getResources();
    context = new AdminCommandContextImpl(LogDomains.getLogger(ListJavaMailResourcesTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
    for (Resource resource : resources.getResources()) {
        if (resource instanceof MailResource) {
            origNum = origNum + 1;
        }
    }
}
Also used : AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) MailResource(org.glassfish.resources.javamail.config.MailResource) Resource(com.sun.enterprise.config.serverbeans.Resource) ParameterMap(org.glassfish.api.admin.ParameterMap) Resources(com.sun.enterprise.config.serverbeans.Resources) Domain(com.sun.enterprise.config.serverbeans.Domain) PropsFileActionReporter(com.sun.enterprise.v3.common.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) MailResource(org.glassfish.resources.javamail.config.MailResource) Before(org.junit.Before)

Example 22 with AdminCommandContextImpl

use of org.glassfish.api.admin.AdminCommandContextImpl in project Payara by payara.

the class CreateIiopListenerTest method setUp.

@Before
public void setUp() {
    services = getHabitat();
    iiopService = services.getService(IiopService.class);
    parameters = new ParameterMap();
    context = new AdminCommandContextImpl(LogDomains.getLogger(CreateIiopListenerTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
    cr = services.getService(CommandRunner.class);
}
Also used : AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) IiopService(org.glassfish.orb.admin.config.IiopService) ParameterMap(org.glassfish.api.admin.ParameterMap) PropsFileActionReporter(com.sun.enterprise.v3.common.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) Before(org.junit.Before)

Example 23 with AdminCommandContextImpl

use of org.glassfish.api.admin.AdminCommandContextImpl in project Payara by payara.

the class DeleteIiopListenerTest method setUp.

@Before
public void setUp() {
    services = getHabitat();
    iiopService = services.getService(IiopService.class);
    parameters = new ParameterMap();
    cr = services.getService(CommandRunner.class);
    context = new AdminCommandContextImpl(LogDomains.getLogger(DeleteIiopListenerTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
}
Also used : AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) IiopService(org.glassfish.orb.admin.config.IiopService) ParameterMap(org.glassfish.api.admin.ParameterMap) PropsFileActionReporter(com.sun.enterprise.v3.common.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) Before(org.junit.Before)

Example 24 with AdminCommandContextImpl

use of org.glassfish.api.admin.AdminCommandContextImpl in project Payara by payara.

the class ListIiopListenersTest method setUp.

@Before
public void setUp() {
    services = getHabitat();
    IiopService iiopService = services.getService(IiopService.class);
    parameters = new ParameterMap();
    cr = services.getService(CommandRunner.class);
    context = new AdminCommandContextImpl(LogDomains.getLogger(ListIiopListenersTest.class, LogDomains.ADMIN_LOGGER), new PropsFileActionReporter());
    List<IiopListener> listenerList = iiopService.getIiopListener();
    origNum = listenerList.size();
}
Also used : IiopListener(org.glassfish.orb.admin.config.IiopListener) AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) IiopService(org.glassfish.orb.admin.config.IiopService) ParameterMap(org.glassfish.api.admin.ParameterMap) PropsFileActionReporter(com.sun.enterprise.v3.common.PropsFileActionReporter) CommandRunner(org.glassfish.api.admin.CommandRunner) Before(org.junit.Before)

Example 25 with AdminCommandContextImpl

use of org.glassfish.api.admin.AdminCommandContextImpl in project Payara by payara.

the class CreateProfilerTest method setUp.

@Before
public void setUp() {
    assertTrue(javaConfig != null);
    // Get an instance of the CreateProfiler command
    command = habitat.getService(CreateProfiler.class);
    assertTrue(command != null);
    context = new AdminCommandContextImpl(LogDomains.getLogger(CreateProfilerTest.class, LogDomains.ADMIN_LOGGER), habitat.<ActionReport>getService(ActionReport.class, "hk2-agent"));
}
Also used : AdminCommandContextImpl(org.glassfish.api.admin.AdminCommandContextImpl) ActionReport(org.glassfish.api.ActionReport) Before(org.junit.Before)

Aggregations

AdminCommandContextImpl (org.glassfish.api.admin.AdminCommandContextImpl)26 PropsFileActionReporter (com.sun.enterprise.v3.common.PropsFileActionReporter)23 ParameterMap (org.glassfish.api.admin.ParameterMap)18 Before (org.junit.Before)15 CommandRunner (org.glassfish.api.admin.CommandRunner)13 Test (org.junit.Test)10 ConfigApiTest (org.glassfish.tests.utils.ConfigApiTest)9 MessagePart (org.glassfish.api.ActionReport.MessagePart)7 Domain (com.sun.enterprise.config.serverbeans.Domain)4 Resource (com.sun.enterprise.config.serverbeans.Resource)4 Resources (com.sun.enterprise.config.serverbeans.Resources)3 ActionReport (org.glassfish.api.ActionReport)3 AdminCommandContext (org.glassfish.api.admin.AdminCommandContext)3 IiopService (org.glassfish.orb.admin.config.IiopService)3 PlainTextActionReporter (com.sun.enterprise.v3.common.PlainTextActionReporter)2 ArrayList (java.util.ArrayList)2 Ignore (org.junit.Ignore)2 ModulesRegistry (com.sun.enterprise.module.ModulesRegistry)1 RestartDomainCommand (com.sun.enterprise.v3.admin.RestartDomainCommand)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1