Package org.lightadmin.api.config.unit

Examples of org.lightadmin.api.config.unit.EntityMetadataConfigurationUnit


@SuppressWarnings("unchecked")
public class DefaultEntityMetadataConfigurationUnitBuilderTest {

    @Test
    public void defaultConfigurationUnitCreatedForDomainType() throws Exception {
        final EntityMetadataConfigurationUnit configurationUnit = configurationBuilder().build();

        assertEquals(DomainConfigurationUnitType.CONFIGURATION, configurationUnit.getDomainConfigurationUnitType());
        assertEquals(DomainType.class, configurationUnit.getDomainType());
    }
View Full Code Here


        assertEquals(DomainType.class, configurationUnit.getDomainType());
    }

    @Test
    public void configurationWithNameFieldExtractorCreated() throws Exception {
        final EntityMetadataConfigurationUnit configurationUnit = configurationBuilder()
                .nameField("name")
                .build();

        assertNotNull(configurationUnit.getNameExtractor());
        assertEquals("Domain Type Object Name", configurationUnit.getNameExtractor().apply(new DomainType()));
    }
View Full Code Here

    @Test
    public void configurationWithNameExtractorCreated() throws Exception {
        final EntityNameExtractor expectedEntityNameExtractor = EasyMock.createNiceMock(EntityNameExtractor.class);

        final EntityMetadataConfigurationUnit configurationUnit = configurationBuilder()
                .nameExtractor(expectedEntityNameExtractor)
                .build();

        assertNotNull(configurationUnit.getNameExtractor());
        assertEquals(expectedEntityNameExtractor, configurationUnit.getNameExtractor());
    }
View Full Code Here

TOP

Related Classes of org.lightadmin.api.config.unit.EntityMetadataConfigurationUnit

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.