Package com.volantis.mcs.testtools.application

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


        request.setHeaderField("host", "www.volantis.com:8080");
        request.setHeaderField("Accept", "text/html");
        request.setHeaderField("HeaderName", "HeaderValue");

        ConfigValue cv = new ConfigValue();
        AppConfigurator ac = new MyAppConfigurator();
        ac.setUp(cv);
        try {
            ConfigFileBuilder configFileBuilder = new ConfigFileBuilder();
            configFileBuilder.buildConfigDocument(cv);
            servletRunner.setRealPath(configFileBuilder.getConfigFileDir());

            hypersonicManager.useCleanupWith(new Executor() {
                public void execute() throws Exception {
                    createRepository();

                    WebResponse response = servletClient.getResponse(request);
                    assertEquals("Response Not as expected.",
                            "Device is Wibble", response.getText());
                }
          });
        } finally {
            ac.tearDown(cv);
            // Need to shut down volantis or we leave a connection pool running.
            Volantis.getInstance().shutdown();
        }
    }
View Full Code Here


        request.setHeaderField("host", "www.volantis.com:8080");
        request.setHeaderField("Accept", "text/html");
        request.setHeaderField("HeaderName", "HeaderValue");

        ConfigValue cv = new ConfigValue();
        AppConfigurator ac = new MyAppConfigurator();
        ac.setUp(cv);
        try {
            ConfigFileBuilder configFileBuilder = new ConfigFileBuilder();
            configFileBuilder.buildConfigDocument(cv);
            servletRunner.setRealPath(configFileBuilder.getConfigFileDir());

            hypersonicManager.useCleanupWith(new Executor() {
                public void execute() throws Exception {
                    createRepository();

                    WebResponse response = servletClient.getResponse(request);
                    assertEquals("Response Not as expected.",
                            "Device is Wibble", response.getText());
                    response = servletClient.getResponse(request);
                    assertEquals("Response Not as expected.",
                            "Device is Wibble", response.getText());

                    response = servletClient.getResponse(request);
                    assertEquals("Response Not as expected.",
                            "Device is Wibble", response.getText());
                }
            });
        } finally {
            ac.tearDown(cv);
            // Need to shut down volantis or we leave a connection pool running.
            Volantis.getInstance().shutdown();
        }
    }
View Full Code Here

        request.setHeaderField( "Accept", "text/html");
        request.setHeaderField( "HeaderName", "HeaderValue");

        // todo: this should be using AppManager instead of the code below
        ConfigValue cv = new ConfigValue();
        AppConfigurator ac = new MyAppConfigurator();
        ac.setUp( cv );
        try {
            ConfigFileBuilder configFileBuilder = new ConfigFileBuilder();
            configFileBuilder.buildConfigDocument(cv);
            servletRunner.setRealPath(configFileBuilder.getConfigFileDir());

            hypersonicManager.useCleanupWith(new Executor() {
                public void execute() throws Exception {
                    createRepository();

                    WebResponse response = servletClient.getResponse(request);
                    assertEquals("Response Not as expected.",
                        "Device is Test", response.getText());
                }
            });
        } finally {
            ac.tearDown(cv);
            // Need to shut down volantis or we leave a connection pool running.
            Volantis.getInstance().shutdown();
        }
    }
View Full Code Here

        request.setHeaderField( "Accept", "text/html");
        request.setHeaderField( "HeaderName", "HeaderValue");

        // todo: this should be using AppManager instead of the code below
        ConfigValue cv = new ConfigValue();
        AppConfigurator ac = new MyAppConfigurator();
        ac.setUp( cv );
        try {
            ConfigFileBuilder configFileBuilder = new ConfigFileBuilder();
            configFileBuilder.buildConfigDocument(cv);
            servletRunner.setRealPath(configFileBuilder.getConfigFileDir());
            hypersonicManager.useCleanupWith(new Executor() {
                public void execute() throws Exception {
                    createRepository();

                    WebResponse response = servletClient.getResponse(request);
                    assertEquals("Response Not as expected.",
                        "Device is Invalid", response.getText());
                }
            });
        } finally {
            ac.tearDown(cv);
            // Need to shut down volantis or we leave a connection pool running.
            Volantis.getInstance().shutdown();
        }
    }
View Full Code Here

TOP

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

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.