Package com.volantis.mcs.testtools.application

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


            }
        });
    }

    public void testInitializeNull() throws Exception {
        ConfigChecker checker =
                new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                super.setUp(config);
            }
        });
        checker.checkInitialisation();
    }
View Full Code Here


     * the mcs-config.xml file by Volantis initialisation.
     * 
     * @throws Exception
     */
    public void testInitializeBasicAndXMLRepositoryValues() throws Exception {
        ConfigChecker checker =
                new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                super.setUp(config);
                // Create a basic, valid set of configuration values.
                // (We do this from scratch rather than reuse another
                // configurator instance to ensure we get everything.)
                // Simple attributes
                // config.licenseDirectory provided by superclass
                config.pageMessageHeading = "a nice new message";
                // Base directories
                config.chartImagesBase = "somechartimages";
                config.modesetsBase = "somemodesets";
                config.scriptsBase = "somescripts";
                // Local repository
                // config.repositoryType provided by superclass
                // config.repositoryXmlFile provided by superclass
                // Default asset url prefixes
                config.audioUrlPrefix = "/audio/";
                config.dynvisUrlPrefix = "/dynvis/";
                config.imageUrlPrefix = "/images/";
                config.scriptUrlPrefix = "/scripts/";
                config.textUrlPrefix = "/text/";
                // App server related
                config.internalUrl = "exampleInternalUrl";
                config.baseUrl = "exampleBaseUrl";
                config.pageBase = "examplePageBase";
                // Stylesheet related
                config.styleBaseUrl = "exampleBaseUrl";
                // config.styleCacheEnabled = Boolean.TRUE; requires theme caching too
                // Debug related
                config.debugComments = Boolean.TRUE;
                config.debugLogPageOutput = Boolean.TRUE;
                // Log4j
                // config.log4jXmlConfigFile provided by superclass

            }
        });
        checker.checkInitialisation();
    }
View Full Code Here

   
    /**
     * Test that the configuration for markup plugins is correctly parsed.    
     */
    public void testInitializeMarkupPlugins() throws Exception {
        ConfigChecker checker =
                new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                super.setUp(config);
               
                List argList = makeArgumentList("myArg", "argValue", 3);
                config.markupPlugins = makePluginConfigurationList("myPlugin",
                        "com.volantis.mcs.integration.TestMarkupPlugin",
                        "application", argList, 6);
            }
        });
        checker.checkInitialisation();
    }
View Full Code Here

        });
        checker.checkInitialisation();
    }

    public void testInitializeAssetTranscoderPlugin() throws Exception {
        ConfigChecker checker =
            new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            // Inherit javadoc.
            public void setUp(ConfigValue config) throws Exception {
                super.setUp(config);

                config.assetTranscoderPluginClass =
                     ICSWithGIFTransforceCompatibility.class.getName();
            }
        });

        checker.checkInitialisation();
    }
View Full Code Here

        // Volantis.initializeInternal where exceptions were thrown away.
        final HypersonicManager dbMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        dbMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {
                ConfigChecker checker =
                        new ConfigChecker(volantis,
                                servletContext);
                checker.setAppConf(new MandatoryAppConfigurator() {
                    public void setUp(ConfigValue config) throws Exception {
                        // Include mandatory stuff.
                        super.setUp(config);
                        // Add in some repository properties
                        config.repositoryType = "odbc";
                        // vaguely correct values for the db we are using
                        config.repositoryUser =
                                HypersonicManager.DEFAULT_USERNAME;
                        config.repositoryPassword =
                                HypersonicManager.DEFAULT_PASSWORD;
                        config.repositoryVendor = "hypersonic";
                        config.repositorySource = dbMgr.getSource();
                        ConfigProjectPoliciesJdbcValue jdbcPolicies =
                                new ConfigProjectPoliciesJdbcValue();
                        jdbcPolicies.projectName = "#DefaultProject";
                        config.defaultProjectPolicies = jdbcPolicies;
                        // These are unused by Hypersonic but we can check.
                        config.repositoryHost = "an unknown host";
                        config.repositoryPort = new Integer(999);
                        config.repositoryDbPoolMax = new Integer(999);
                        config.repositoryKeepConnectionsAlive = Boolean.TRUE;
                        config.repositoryConnectionPollInterval =
                                new Integer(60);
                        config.standardJDBCDeviceRepositoryProject =
                                "#DefaultProject";
                    }
                });
                checker.checkInitialisation();
            }
        });
    }
View Full Code Here

     * the mcs-config.xml file by Volantis initialisation.
     *
     * @throws Exception
     */
    public void testInitialiseLocalPolicyCachePropertyValues() throws Exception {
        ConfigChecker checker =
                new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Include minimal requirements for dummy XML repository.
                super.setUp(config);
                // Add in the theme cache stuff
                ConfigValuePolicyCache cache = new ConfigValuePolicyCache();
                cache.policyType = PolicyType.THEME;
                cache.strategy = "least-recently-used";
                cache.maxEntries = new Integer(1111);
                cache.timeout = new Integer(2222);
                config.policyCaches.put("theme-cache", cache);
            }
        });
        checker.checkInitialisation();
    }       
View Full Code Here

     * the mcs-config.xml file by Volantis initialisation.
     *
     * @throws Exception
     */
    public void testInitialiseRemotePolicyCachePropertyValues() throws Exception {
        ConfigChecker checker =
                new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Include minimal requirements for dummy XML repository.
                super.setUp(config);
                // Add in the remote policy cache stuff
                // First add an entry for the global settings
                ConfigValueRemotePolicy remoteCacheGlobal =
                        new ConfigValueRemotePolicy();
                remoteCacheGlobal.cachePolicies = Boolean.FALSE;
                remoteCacheGlobal.defaultTimeToLive = new Integer(1);
                remoteCacheGlobal.defaultRetryFailedRetrieval = Boolean.FALSE;
                remoteCacheGlobal.defaultRetryInterval = new Integer(2);
                remoteCacheGlobal.defaultRetryMaxCount = new Integer(3);
                remoteCacheGlobal.defaultRetainDuringRetry = Boolean.FALSE;
                remoteCacheGlobal.maxCacheSize = new Integer(4);
                remoteCacheGlobal.maxTimeToLive = new Integer(5);
                remoteCacheGlobal.allowRetryFailedRetrieval = Boolean.TRUE;
                remoteCacheGlobal.minRetryInterval = new Integer(6);
                remoteCacheGlobal.maxRetryMaxCount = new Integer(7);
                remoteCacheGlobal.allowRetainDuringRetry = Boolean.TRUE;
                config.remotePolicyCaches = remoteCacheGlobal;
            }
        });
        checker.checkInitialisation();
    }
View Full Code Here

     * the mcs-config.xml file by Volantis initialisation.
     *
     * @throws Exception
     */
    public void testInitialiseRemotePolicyQuotaPropertyValues() throws Exception {
        ConfigChecker checker =
                new ConfigChecker(volantis, servletContext);
        checker.setAppConf(new MinimalXmlRepositoryAppConfigurator() {
            public void setUp(ConfigValue config) throws Exception {
                // Include minimal requirements for dummy XML repository.
                super.setUp(config);
                // Add in the remote quota cache stuff
                // First an entry for the global settings
                List quotaListGlobal = new ArrayList();
                quotaListGlobal.add(new ConfigValueRemoteQuota(
                        "http://global-one.com", 60));
                quotaListGlobal.add(new ConfigValueRemoteQuota(
                        "http://global-two.com", 40));
                config.remotePolicyQuotaList = quotaListGlobal;

                config.remoteRepositoryTimeout = new Integer(9);
            }
        });
        checker.checkInitialisation();
    }
View Full Code Here

TOP

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

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.