Examples of ElementAtIndex


Examples of info.archinnov.achilles.internal.proxy.dirtycheck.DirtyCheckChangeSet.ElementAtIndex

    }

    @Test
    public void should_get_encoded_list_change_at_index() throws Exception {
        //Given
        changeSet.listChangeAtIndex = new ElementAtIndex(0, "a");
        when(pm.forTranscoding().<List<Object>>encodeToCassandra(Arrays.asList("a"))).thenReturn(Arrays.<Object>asList("a"));

        //When
        ElementAtIndex actual = changeSet.getEncodedListChangeAtIndex();

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

Examples of info.archinnov.achilles.internal.proxy.dirtycheck.DirtyCheckChangeSet.ElementAtIndex

    }

    @Test
    public void should_get_null_list_change_at_index() throws Exception {
        //When
        ElementAtIndex actual = changeSet.getEncodedListChangeAtIndex();

        //Then
        assertThat(actual).isNull();
        verifyZeroInteractions(pm);
    }
View Full Code Here

Examples of info.archinnov.achilles.internal.proxy.dirtycheck.DirtyCheckChangeSet.ElementAtIndex

    }

    @Test
    public void should_generate_update_for_set_element_at_index() throws Exception {
        //Given
        changeSet.listChangeAtIndex = new ElementAtIndex(1, "a");
        final Conditions update = update();
        when(pm.forTranscoding().<List<Object>>encodeToCassandra(Arrays.asList("a"))).thenReturn(Arrays.<Object>asList("a"));
        when(pm.forStatementGeneration().generateUpdateForSetAtIndexElement(update, 1, "a")).thenReturn(update.with(setIdx("property", 1, bindMarker())));

        //When
View Full Code Here

Examples of info.archinnov.achilles.internal.proxy.dirtycheck.DirtyCheckChangeSet.ElementAtIndex

    }

    @Test
    public void should_generate_update_for_remove_element_at_index() throws Exception {
        //Given
        changeSet.listChangeAtIndex = new ElementAtIndex(1, "a");
        final Conditions update = update();
        when(pm.forTranscoding().<List<Object>>encodeToCassandra(Arrays.asList("a"))).thenReturn(Arrays.<Object>asList("a"));
        when(pm.forStatementGeneration().generateUpdateForSetAtIndexElement(update, 1, "a")).thenReturn(update.with(setIdx("property", 1, null)));

        //When
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.