Package org.grails.core.artefact

Examples of org.grails.core.artefact.DomainClassArtefactHandler


    public void testIsDomainClass() {

        GroovyClassLoader gcl = new GroovyClassLoader();
        Class<?> c = gcl.parseClass("class Test { Long id;Long version;}\n");

        ArtefactHandler handler = new DomainClassArtefactHandler();
        assertTrue(handler.isArtefact(c));
    }
View Full Code Here


    public void testDomainClassWithNameEndingInCodecIsNotACodec() {
        GroovyClassLoader gcl = new GroovyClassLoader();
        Class<?> c = gcl.parseClass("class MySpecialCodec { Long id;Long version;}\n");

        ArtefactHandler domainClassHandler = new DomainClassArtefactHandler();
        assertTrue(domainClassHandler.isArtefact(c));

        ArtefactHandler codecHandler = new CodecArtefactHandler();
        assertFalse(codecHandler.isArtefact(c));
    }
View Full Code Here

TOP

Related Classes of org.grails.core.artefact.DomainClassArtefactHandler

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.