Package info.archinnov.achilles.type

Examples of info.archinnov.achilles.type.ConsistencyLevel


    public void should_get_read_level_from_context_rather_than_property_meta() throws Exception {
        //Given
        when(context.getConsistencyLevel()).thenReturn(options.getConsistencyLevel());

        //When
        final ConsistencyLevel actual = overrider.getReadLevel(context, pm);

        //Then
        assertThat(actual).isEqualTo(EACH_QUORUM);
    }
View Full Code Here


        //Given
        when(context.getConsistencyLevel()).thenReturn(noOptions.getConsistencyLevel());
        when(pm.structure().getReadConsistencyLevel()).thenReturn(LOCAL_QUORUM);

        //When
        final ConsistencyLevel actual = overrider.getReadLevel(context, pm);

        //Then
        assertThat(actual).isEqualTo(LOCAL_QUORUM);
    }
View Full Code Here

    public void should_get_write_level_from_context_rather_than_property_meta() throws Exception {
        //Given
        when(context.getConsistencyLevel()).thenReturn(options.getConsistencyLevel());

        //When
        final ConsistencyLevel actual = overrider.getWriteLevel(context, pm);

        //Then
        assertThat(actual).isEqualTo(EACH_QUORUM);
    }
View Full Code Here

        //Given
        when(context.getConsistencyLevel()).thenReturn(noOptions.getConsistencyLevel());
        when(pm.structure().getWriteConsistencyLevel()).thenReturn(LOCAL_QUORUM);

        //When
        final ConsistencyLevel actual = overrider.getWriteLevel(context, pm);

        //Then
        assertThat(actual).isEqualTo(LOCAL_QUORUM);
    }
View Full Code Here

        assertThat(found.getName()).isEqualTo(name);
    }

    private void assertThatBatchContextHasBeenReset(Batch batchEm) {
        BatchingFlushContext flushContext = Whitebox.getInternalState(batchEm, BatchingFlushContext.class);
        ConsistencyLevel consistencyLevel = Whitebox.getInternalState(flushContext, "consistencyLevel");
        List<AbstractStatementWrapper> statementWrappers = Whitebox.getInternalState(flushContext, "statementWrappers");

        assertThat(consistencyLevel).isEqualTo(ConsistencyLevel.ONE);
        assertThat(statementWrappers).isEmpty();
    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.type.ConsistencyLevel

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.