Package info.archinnov.achilles.internal.utils

Examples of info.archinnov.achilles.internal.utils.ConfigMap


    }

    @Test
    public void should_init_osgi_classloader() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(OSGI_CLASS_LOADER, this.getClass().getClassLoader());

        //When
        final ClassLoader actual = extractor.initOSGIClassLoader(params);

        //Then
View Full Code Here


    }

    @Test
    public void should_init_default_executor_service() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();

        //When
        final ExecutorService executorService = extractor.initExecutorService(params);

        //Then
View Full Code Here

    }

    @Test
    public void should_init_relax_index_validation() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(RELAX_INDEX_VALIDATION, true);

        //When
        final boolean actual = extractor.initRelaxIndexValidation(params);

        //Then
        assertThat(actual).isTrue();
        assertThat(extractor.initRelaxIndexValidation(new ConfigMap())).isFalse();
    }
View Full Code Here

    }

   @Test
    public void should_init_global_naming_strategy() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(GLOBAL_NAMING_STRATEGY, NamingStrategy.CASE_SENSITIVE);

        //When
        final NamingStrategy actual = extractor.initGlobalNamingStrategy(params);

        //Then
View Full Code Here

    }

    @Test
    public void should_init_default_global_naming_strategy() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();

        //When
        final NamingStrategy actual = extractor.initGlobalNamingStrategy(params);

        //Then
View Full Code Here

    }

    @Test
    public void should_init_custom_executor_service() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(EXECUTOR_SERVICE, executorService);

        //When
        final ExecutorService executorService = extractor.initExecutorService(params);

        //Then
View Full Code Here

     *            list of tables to truncate before and after tests
     */
    public AchillesInternalCQLResource(String... tables) {
        super(tables);
        final TypedMap config = buildConfigMap();
        final ConfigMap achillesConfig = buildAchillesConfigMap();

        server = new CassandraEmbeddedServer(config, achillesConfig);
        pmf = server.getPersistenceManagerFactory(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        manager = server.getPersistenceManager(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        asyncManager = server.getAsyncManager(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
View Full Code Here

     *            tests, depending on the 'cleanUpSteps' parameters
     */
    public AchillesInternalCQLResource(Steps cleanUpSteps, String... tables) {
        super(cleanUpSteps, tables);
        final TypedMap config = buildConfigMap();
        final ConfigMap achillesConfig = buildAchillesConfigMap();

        server = new CassandraEmbeddedServer(config, achillesConfig);
        pmf = server.getPersistenceManagerFactory(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        manager = server.getPersistenceManager(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        asyncManager = server.getAsyncManager(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
View Full Code Here

     */
    public AchillesInternalCQLResource(Steps cleanUpSteps, InsertStrategy insertStrategy, String... tables) {
        super(cleanUpSteps, tables);
        this.insertStrategy = insertStrategy;
        final TypedMap config = buildConfigMap();
        final ConfigMap achillesConfig = buildAchillesConfigMap();

        server = new CassandraEmbeddedServer(config, achillesConfig);
        pmf = server.getPersistenceManagerFactory(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        manager = server.getPersistenceManager(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        asyncManager = server.getAsyncManager(DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
View Full Code Here

        return config;
    }


    private ConfigMap buildAchillesConfigMap() {
        ConfigMap config = new ConfigMap();
        config.put(FORCE_TABLE_CREATION, true);
        config.put(BEAN_VALIDATION_ENABLE, true);
        config.put(GLOBAL_INSERT_STRATEGY, insertStrategy);
        config.put(KEYSPACE_NAME, DEFAULT_ACHILLES_TEST_KEYSPACE_NAME);
        config.put(ENTITY_PACKAGES, ACHILLES_ENTITY_PACKAGES);
        return config;
    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.internal.utils.ConfigMap

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.