Package org.apache.tapestry5.test

Examples of org.apache.tapestry5.test.Jetty7Runner


    @SuppressWarnings("unchecked")
    @Test
    public void constraint_value_from_message_catalog_per() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here


    @SuppressWarnings("unchecked")
    @Test
    public void constraint_value_from_message_catalog_per_form() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void missing_field_validator_constraint() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void single_validator_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void multiple_validators_via_specification() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator required = mockValidator();
        Validator minLength = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void validator_with_constraint() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
View Full Code Here

        selenium.waitForPageToLoad("5000");
    }

    private Jetty7Runner configureClusteredJetty(String name, int port) throws Exception
    {
        Jetty7Runner runner = new Jetty7Runner();

        runner.configure("src/test/cluster", "", port, port + 100);

        JDBCSessionIdManager idMgr = new JDBCSessionIdManager(runner.getServer());
        idMgr.setWorkerName(name);
        idMgr.setDriverInfo("org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:clustertest");

        Server server = runner.getServer();
        server.setSessionIdManager(idMgr);

        WebAppContext wac = (WebAppContext) server.getHandler();

        JDBCSessionManager jdbcMgr = new JDBCSessionManager();
        jdbcMgr.setIdManager(server.getSessionIdManager());

        // force the session to be read from the database with no delay
        // This is an incorrectly documented feature.
        jdbcMgr.setSaveInterval(0);

        wac.setSessionHandler(new SessionHandler(jdbcMgr));
        wac.getServletContext().setInitParameter("cluster.name", name);
        runner.start();
        return runner;
    }
View Full Code Here

     * @throws Exception
     */
    protected Runnable launchWebServer(String webAppFolder, String contextPath, int port, int sslPort)
            throws Exception
    {
        final Jetty7Runner runner = new Jetty7Runner(webAppFolder, contextPath, port, sslPort);

        return new Runnable()
        {
            public void run()
            {
                runner.stop();
            }
        };
    }
View Full Code Here

    public static void main(String[] args) throws Exception
    {
        String contextName = args[0];
        String path = args[1];
       
        new Jetty7Runner(path, contextName, 9090, 8443);
    }
View Full Code Here

    {
        File workingDir = new File(System.getProperty("user.dir"));

        new File(workingDir, "target/tmp").mkdirs();

        new Jetty7Runner("src/test/webapp", "/", 8080, 9999).start();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.test.Jetty7Runner

Copyright © 2018 www.massapicom. 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.