Package com.volantis.mcs.testtools.application

Examples of com.volantis.mcs.testtools.application.AppManager


        MPSAppConfigurator appConf = new MPSAppConfigurator();
        appConf.setPluginConfigValue(mps);
        // Set appConf in AppManager
        volantis = new Volantis();
        servletContext = new ServletContextStub();
        AppManager am = new AppManager(volantis, servletContext);
        am.setAppConf(appConf);
        PluginConfigFileBuilder builder = new MPSPluginConfigBuilder();
        am.registerPluginConfigFileBuilder(builder, mps.getClass());
        am.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                checkConfiguration(volantis, mps);
            }
        });
    }
View Full Code Here


        MPSAppConfigurator appConf = new MPSAppConfigurator();
        appConf.setPluginConfigValue(mps);

        volantisBean = new Volantis();
        ServletContextStub servletContext = new ServletContextStub();
        appManager = new AppManager(volantisBean, servletContext);
        appManager.setAppConf(appConf);
        PluginConfigFileBuilder builder = new MPSPluginConfigBuilder();
        appManager.registerPluginConfigFileBuilder(builder, mps.getClass());

        Properties props = System.getProperties();
View Full Code Here

        appConf.setPluginConfigValue(mps);
        // Set appConf in AppManager
        volantisBean = new Volantis();
        ServletContextStub servletContext = new ServletContextStub();
        AppManager am = new AppManager(volantisBean, servletContext);
        am.setAppConf(appConf);
        PluginConfigFileBuilder builder = new MPSPluginConfigBuilder();
        am.registerPluginConfigFileBuilder(builder, mps.getClass());
        am.useAppWith(executor);
    }
View Full Code Here

    /**
     * Tests that an existing expression context is copied to a nested context.
     */
    public void testNestedContextsWithExpressionContext() throws Exception {
        AppManager mgr = new AppManager(volantis, servletContext);
        mgr.setAppConf(new DefaultAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                super.setUp(config);
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) throws Exception {
                doNestedContextsWithExpression();
            }
        });
    }
View Full Code Here

     */
    public void doTestElementEnd(String invokeMethod) throws Exception {
        Volantis volantis = new TestableVolantis();
        ServletContextStub contextStub = new ServletContextStub();
       
        AppManager appManager = new AppManager(volantis, contextStub);
        appManager.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                super.setUp(config);

                ArgumentConfiguration ac = new ArgumentConfiguration();
                ac.setName("argName");
                ac.setValue("argValue");
                ArrayList argsList = new ArrayList(1);
                argsList.add(ac);
               
                MarkupPluginConfiguration mpc =
                        new MarkupPluginConfiguration();
                mpc.setName("myPlugin");
                mpc.setClassName("com.volantis.mcs.integration.iapi." +
                        "InvokeElementTestCase$InvokeTestMarkupPlugin");
                mpc.setScope("application");               
                ArrayList pluginList = new ArrayList(1);
                pluginList.add(mpc);
               
                config.markupPlugins = pluginList;
            }
        });
       
        AppExecutor executor = new InvokeAppExecutor(volantis, invokeMethod);
        appManager.useAppWith(executor);
    }
View Full Code Here

     * and application configuration.
     * <p>
     * This captures stderr and checks there is nothing unexpected.
     */
    public void testInitialiseSuccess() throws Exception {
        AppManager mgr = new AppManager(volantis, servletContext);
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) throws Exception {
                String err = context.getConsoleOutput().getErr();
                // Note: this is deliberately as specific as possible to
                // ensure that ANY changes in the way that volantis
                // initialisation affects System.err are at least found here;
View Full Code Here

     *
     * @throws Exception if an error occurs.
     */
    public void testRemoteRepositoryConnectionNoPagePackaging()
            throws Exception {
        AppManager mgr = new AppManager(volantis, servletContext);
        mgr.setAppConf(new DefaultAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Set up default values...
                super.setUp(config);
                // ... apart from what we are testing.
                config.pagePackagingMimeEnabled = Boolean.TRUE;
                config.pagePackagingMimeEnabled = null;
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                assertEquals("Page packaging not as", false,
                        volantis.isPagePackagingMimeEnabled());
            }
        });
View Full Code Here

     *
     * @throws Exception if an error occurs.
     */
    public void testRemoteRepositoryConnectionPagePackaging()
            throws Exception {
        AppManager mgr = new AppManager(volantis, servletContext);
        mgr.setAppConf(new DefaultAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Set up default values...
                super.setUp(config);
                // ... apart from what we are testing.
                config.pagePackagingMimeEnabled = Boolean.TRUE;
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                assertEquals("Page packaging not as", true,
                        volantis.isPagePackagingMimeEnabled());
            }
        });
View Full Code Here

            }
        });
    }

    public void testProtocolsConfigurationAbsent() throws Exception {
        AppManager mgr = new AppManager(volantis, servletContext);
        mgr.setAppConf(new DefaultAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Set up default values...
                super.setUp(config);
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                ProtocolsConfiguration pc =
                    volantis.getProtocolsConfiguration();
                assertNotNull("Protocols configuration should exist", pc );
                assertEquals( "Preferred output should be WMLC",
View Full Code Here

            }
        });
    }   

    public void testProtocolsConfigurationPresent() throws Exception {
        AppManager mgr = new AppManager(volantis, servletContext);
        mgr.setAppConf(new DefaultAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Set up default values...
                super.setUp(config);
                config.wmlPreferredOutputFormat = "wml";
            }
        });
        mgr.useAppWith(new AppExecutor() {
            public void execute(AppContext context) {
                ProtocolsConfiguration pc =
                    volantis.getProtocolsConfiguration();
                assertNotNull("Protocols configuration should exist", pc );
                assertEquals( "Preferred output should be WML",
View Full Code Here

TOP

Related Classes of com.volantis.mcs.testtools.application.AppManager

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.