Examples of Servers


Examples of com.icegreen.greenmail.util.Servers

        assertEquals(subject, emails[0].getSubject());
        assertEquals(body, servers.util().getBody(emails[0]).trim());
    }

    public void testSmtpServerReceiveInThread() throws Throwable {
        servers = new Servers(ServerSetupTest.SMTP);
        servers.start();
        assertEquals(0, servers.getReceivedMessages().length);

        Thread sendThread = new Thread() {
            public void run() {
View Full Code Here

Examples of com.icegreen.greenmail.util.Servers

        assertEquals(1, emails.length);
        sendThread.join(10000);
    }

    public void testSmtpServerReceiveMultipart() throws Exception {
        servers = new Servers(ServerSetupTest.SMTP);
        servers.start();
        assertEquals(0, servers.getReceivedMessages().length);

        String subject = servers.util().random();
        String body = servers.util().random();
View Full Code Here

Examples of com.icegreen.greenmail.util.Servers

        }
        super.tearDown();
    }

    public void testRetreive() throws Exception {
        servers = new Servers(ServerSetupTest.SMTP_POP3);
        assertNotNull(servers.getPop3());
        servers.start();
        final String subject = servers.util().random();
        final String body = servers.util().random() + "\r\n" + servers.util().random() + "\r\n" + servers.util().random();
        String to = "test@localhost.com";
View Full Code Here

Examples of com.icegreen.greenmail.util.Servers

        assertEquals(subject, messages[0].getSubject());
        assertEquals(body, servers.util().getBody(messages[0]).trim());
    }

    public void testPop3sReceive() throws Throwable {
        servers = new Servers(new ServerSetup[]{ServerSetupTest.SMTPS, ServerSetupTest.POP3S});
        assertNull(servers.getPop3());
        assertNotNull(servers.getPop3s());
        servers.start();
        final String subject = servers.util().random();
        final String body = servers.util().random();
View Full Code Here

Examples of com.icegreen.greenmail.util.Servers

        assertEquals(subject, messages[0].getSubject());
        assertEquals(body, servers.util().getBody(messages[0]).trim());
    }

    public void testRetreiveWithNonDefaultPassword() throws Exception {
        servers = new Servers(ServerSetupTest.SMTP_POP3);
        assertNotNull(servers.getPop3());
        final String to = "test@localhost.com";
        final String password = "donotharmanddontrecipricateharm";
        servers.setUser(to, password);
        servers.start();
View Full Code Here

Examples of com.icegreen.greenmail.util.Servers

        assertEquals(subject, messages[0].getSubject());
        assertEquals(body, servers.util().getBody(messages[0]).trim());
    }

    public void testRetriveMultipart() throws Exception {
        servers = new Servers(ServerSetupTest.SMTP_POP3);
        assertNotNull(servers.getPop3());
        servers.start();

        String subject = servers.util().random();
        String body = servers.util().random();
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.Servers

    private String getDefaultTarget() throws AutoDeploymentException {
        try{
            ConfigContext confContext = getConfigContext();
            Domain domain = (Domain)confContext.getRootConfigBean();
            Servers svrs = domain.getServers();
            Server[] svrArr = svrs.getServer();
            int size = svrArr.length;
            String targetName = null;
            /*I am putting this logic specific for TP, as its decided to deploy directly
             *to instsnce, and not DAS. It need to be changed to next release
             */
 
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.Servers

    private String[] getTargets(){
        try{
            ConfigContext confContext = _context.getConfigContext();
            Domain domain = (Domain)confContext.getRootConfigBean();
            Servers svrs = domain.getServers();
            Server[] svrArr = svrs.getServer();
            int size = svrArr.length;
            String[] targetNames = new String[size];
            for(int i = 0 ; i< size; i++) {
               targetNames[i] = svrArr[i].getName();
            }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.Servers

                validateUpdate(cce, result);
            } else if (choice.equals(StaticTest.ADD)){
                validateAdd(cce, result);
            } else if(choice.equals(StaticTest.VALIDATE)) {
                Domain domain = (Domain)cce.getConfigContext().getRootConfigBean();
                Servers servers = domain.getServers();
                Server[] server = servers.getServer();
                    String svrName = server[0].getName();
                    if(!server[0].getName().equals("server"))
                        result.failed(smh.getLocalString(getClass().getName() + ".invalidserverName",
                                                         "Invalid Server Name {0}: Required 'server'", new Object[]{svrName}));
            }
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.Servers

                checkDuplicate("audit-module", securityservice.getAuditModule(), "name");
                checkDuplicate("auth-realm", securityservice.getAuthRealm(), "name");
                checkDuplicate("jacc-provider", securityservice.getJaccProvider(), "name");
            }

            Servers servers = domain.getServers();
            checkDuplicate("server", servers.getServer(), "name");
           
        } catch(Exception e) {
            e.printStackTrace();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.