Package info.archinnov.achilles.internal.utils

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


        assertThat(actual).isSameAs(session);
    }

    @Test
    public void should_init_session_without_keyspace() throws Exception {
        ConfigMap params = new ConfigMap();
        when(cluster.connect()).thenReturn(session);

        Session actual = extractor.initSession(cluster, params);

        assertThat(actual).isSameAs(session);
View Full Code Here


        assertThat(actual).isSameAs(session);
    }

    @Test
    public void should_get_native_session_from_parameter() throws Exception {
        ConfigMap params = new ConfigMap();
        params.put(KEYSPACE_NAME, "achilles");
        params.put(NATIVE_SESSION, session);

        Session actual = extractor.initSession(cluster, params);

        assertThat(actual).isSameAs(session);
    }
View Full Code Here

    }

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

        // When
        doReturn(true).when(extractor).initForceTableCreation(params);
        doReturn(factory).when(extractor).initObjectMapperFactory(params);
        doReturn(ANY).when(extractor).initDefaultReadConsistencyLevel(params);
View Full Code Here

    }

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

        // When
        Validator defaultValidator = extractor.initValidator(params);

        // Then
View Full Code Here

    }

    @Test
    public void should_return_null_when_bean_validation_disabled() throws Exception {
        // Given
        ConfigMap params = new ConfigMap();
        params.put(BEAN_VALIDATION_ENABLE, false);

        assertThat(extractor.initValidator(params)).isNull();
    }
View Full Code Here

    }

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

        assertThat(extractor.initValidator(params)).isNull();
    }
View Full Code Here

    @Test
    public void should_get_provided_custom_validator() throws Exception {
        // Given
        FakeValidator customValidator = new FakeValidator();
        ConfigMap params = new ConfigMap();
        params.put(BEAN_VALIDATION_ENABLE, true);
        params.put(BEAN_VALIDATION_VALIDATOR, customValidator);

        // When
        Validator validator = extractor.initValidator(params);

        // Then
View Full Code Here

    }

    @Test
    public void should_init_max_prepared_statements_cache_size() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(PREPARED_STATEMENTS_CACHE_SIZE, 10);

        //When
        Integer actual = extractor.initPreparedStatementsCacheSize(params);

        //Then
View Full Code Here

    }

    @Test
    public void should_init_proxy_warmup() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(PROXIES_WARM_UP_DISABLED, false);

        //When
        boolean actual = extractor.initProxyWarmUp(params);

        //Then
View Full Code Here

    }

    @Test
    public void should_init_insert_strategy() throws Exception {
        //Given
        ConfigMap params = new ConfigMap();
        params.put(GLOBAL_INSERT_STRATEGY, ALL_FIELDS);

        //When
        final InsertStrategy strategy = extractor.initInsertStrategy(params);

        //Then
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.