Package info.archinnov.achilles.test.integration.entity

Examples of info.archinnov.achilles.test.integration.entity.EntityWithNotNullInsertStrategy


    @Test
    public void should_insert_not_null_field_overriding_global_config() throws Exception {
        //Given
        Long id = RandomUtils.nextLong(0,Long.MAX_VALUE);
        EntityWithNotNullInsertStrategy entity = new EntityWithNotNullInsertStrategy();
        entity.setId(id);
        entity.setName("Helen");
        entity.setLabel("label");

        //When
        manager1.insert(entity);
        entity.setLabel(null);

        manager1.insert(entity);

        //Then
        final EntityWithNotNullInsertStrategy found = manager1.find(EntityWithNotNullInsertStrategy.class, id);

        assertThat(found.getName()).isEqualTo("Helen");
        assertThat(found.getLabel()).isEqualTo("label");
    }
View Full Code Here

TOP

Related Classes of info.archinnov.achilles.test.integration.entity.EntityWithNotNullInsertStrategy

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.