Package org.andromda.core.cartridge.template

Examples of org.andromda.core.cartridge.template.Template


        // first template
        final Iterator templateIterator = resources.iterator();
        Resource resource = (Resource)templateIterator.next();
        assertTrue(resource.isLastModifiedCheck());
       
        Template template = (Template)templateIterator.next();
        assertEquals(
            "EntityBean.vsl",
            template.getPath());
        assertEquals(
            "{0}/{1}Bean.java",
            template.getOutputPattern());
        assertEquals(
            "beans",
            template.getOutlet());
        assertTrue(template.isOverwrite());
        assertNotNull(template.getSupportedModeElements());
        assertEquals(
            "entity",
            template.getSupportedModeElements().getVariable());
        Collection modelElements = template.getSupportedModeElements().getModelElements();
        assertNotNull(modelElements);
        assertEquals(
            1,
            modelElements.size());
        ModelElement element = (ModelElement)modelElements.iterator().next();
        assertEquals(
            "Entity",
            element.getStereotype());

        // second template
        template = (Template)templateIterator.next();
        assertEquals(
            "templates/webservice/axis/server-config.wsdd.vsl",
            template.getPath());
        assertEquals(
            "WEB-INF/server-config.wsdd",
            template.getOutputPattern());
        assertEquals(
            "axis-configuration",
            template.getOutlet());
        assertEquals("$viewType.equals('jsp')", template.getOutputCondition());
        assertTrue(template.isOverwrite());
        assertTrue(template.isOutputToSingleFile());
        assertFalse(template.isOutputOnEmptyElements());
        assertNotNull(template.getSupportedModeElements());
        assertEquals(
            "services",
            template.getSupportedModeElements().getVariable());
        modelElements = template.getSupportedModeElements().getModelElements();
        assertNotNull(modelElements);
        assertEquals(
            1,
            modelElements.size());
        element = (ModelElement)modelElements.iterator().next();
View Full Code Here

TOP

Related Classes of org.andromda.core.cartridge.template.Template

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.