Package info.archinnov.achilles.internal.metadata.holder

Examples of info.archinnov.achilles.internal.metadata.holder.EntityMeta



    @Test
    public void should_trigger_interceptor() throws Exception {
        //Given
        EntityMeta meta = mock(EntityMeta.class, RETURNS_DEEP_STUBS);
        Object entity = new Object();

        //When
        context.triggerInterceptor(meta, entity, Event.POST_INSERT);

        //Then
        verify(meta.forInterception()).intercept(entity, Event.POST_INSERT);

    }
View Full Code Here


    }

    @Test
    public void should_return_empty_map_when_table_meta_is_not_found() throws Exception {
        //Given
        EntityMeta meta = mock(EntityMeta.class, RETURNS_DEEP_STUBS);
        KeyspaceMetadata ksMeta = mock(KeyspaceMetadata.class, RETURNS_DEEP_STUBS);

        when(meta.config().getKeyspaceName()).thenReturn("ks");
        when(meta.config().getTableName()).thenReturn("table");
        when(meta.config().getQualifiedTableName()).thenReturn("ks.table");

        when(cluster.getMetadata().getKeyspace("ks")).thenReturn(ksMeta);
        when(ksMeta.getTable("table")).thenReturn(null);

View Full Code Here

TOP

Related Classes of info.archinnov.achilles.internal.metadata.holder.EntityMeta

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.