Search in sources :

Example 16 with MailResource

use of org.glassfish.resources.javamail.config.MailResource 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)

Aggregations

MailResource (org.glassfish.resources.javamail.config.MailResource)16 Resource (com.sun.enterprise.config.serverbeans.Resource)6 Resources (com.sun.enterprise.config.serverbeans.Resources)4 ResourceInfo (org.glassfish.resourcebase.resources.api.ResourceInfo)4 ConfigApiTest (org.glassfish.tests.utils.ConfigApiTest)4 Test (org.junit.Test)4 PropertyVetoException (java.beans.PropertyVetoException)3 ParameterMap (org.glassfish.api.admin.ParameterMap)3 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)3 ResourceRef (com.sun.enterprise.config.serverbeans.ResourceRef)2 ActionReport (org.glassfish.api.ActionReport)2 Domain (com.sun.enterprise.config.serverbeans.Domain)1 Server (com.sun.enterprise.config.serverbeans.Server)1 Servers (com.sun.enterprise.config.serverbeans.Servers)1 PropsFileActionReporter (com.sun.enterprise.v3.common.PropsFileActionReporter)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 AdminCommandContextImpl (org.glassfish.api.admin.AdminCommandContextImpl)1 CommandRunner (org.glassfish.api.admin.CommandRunner)1 ResourceStatus (org.glassfish.resourcebase.resources.api.ResourceStatus)1