Package com.volantis.testtools.stubs

Examples of com.volantis.testtools.stubs.ServletContextStub


        final MPSPluginConfigValue mps = createMpsValue();
        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() {
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());
View Full Code Here

        MPSAppConfigurator appConf = new MPSAppConfigurator();

        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

        configurator.setUp(configValue);

        builder.buildConfigDocument(configValue);

        context = new ServletContextStub() {
            public InputStream getResourceAsStream(String resourceURL) {
                InputStream is = null;

                if (resourceURL.endsWith(".xsd")) {
                    is = super.getResourceAsStream("/tmp/mcs-config.xsd");
View Full Code Here

     * @param context the MyMarinerPageContext to set up.
     */
    private void setUpContext(MyMarinerPageContext context) {
        testRequestContext = new TestMarinerRequestContext();
        volantis = new Volantis();
        servletContext = new ServletContextStub();
        testRequestContext = new TestMarinerRequestContext();

        context.setVolantisBean(volantis);
        // Register a dummy EnvironmentContext against the request context
        ContextInternals.setEnvironmentContext(testRequestContext,
View Full Code Here

    /**
     * Test the method elementEnd.    
     */
    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);
View Full Code Here

                        new DefaultServletApplicationContextFactory());

        ar.registerApplication(
                ApplicationRegistry.DEFAULT_APPLICATION_NAME, arc);

        servletContext = new ServletContextStub();
        volantis = new TestableVolantis() {
            // Javadoc inherited.
            public MarinerPageContext createMarinerPageContext() {
                return new TestMarinerPageContext();
            }
View Full Code Here

     * Returns TestMarinerPageContext
     * @return the MarinerPageContext
     */
    private MarinerPageContext getPageContext() throws Exception {
        Volantis volantis = new TestableVolantis();
        ServletContextStub servletContext = new ServletContextStub();
        AppManager appManager = new AppManager(volantis, servletContext);       
        appManager.useAppWith(new AppExecutor() {
            public void execute(AppContext context) throws Exception {
                String err = context.getConsoleOutput().getErr();
                // Note: this is deliberately as specific as possible to
View Full Code Here

    public void setUp() throws Exception{

        styleBaseDir = IOUtils.createDirectory(
                File.createTempFile("styleBaseDir", "", new File("/tmp")));
        volantis = new TestableVolantis();
        servletContext = new ServletContextStub();
    }
View Full Code Here

    }

    public DeviceRepositoryLocation getDeviceRepositoryLocation()
            throws ConfigurationException {
        return volantis.getDeviceRepositoryLocation(
                new ServletConfigContext(new ServletContextStub()));

    }
View Full Code Here

TOP

Related Classes of com.volantis.testtools.stubs.ServletContextStub

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.