Package org.jboss.forge.addon.templates

Examples of org.jboss.forge.addon.templates.Template


        root.put("entityName", "SampleEntity");
        root.put("pluralizedEntityName", "SampleEntities");
        root.put("entityId", manyToOneProperty);
        root.put("properties", properties);
        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.SEARCH_RESULTS));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        Document html = Jsoup.parseBodyFragment(output);
        assertThat(output.trim(), not(equalTo("")));
       
        Elements headers = html.select("table > thead > tr > th");
        assertThat(headers.size(), equalTo(1));
View Full Code Here


        entityAttributeProperties.add(ENTITY_VERSION_PROP);
        entityAttributeProperties.add(BASIC_STRING_PROP);
        Map<String, Object> root = createEntityRootmap(entityAttributeProperties);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.NEW_ENTITY_CONTROLLER_JS));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

        entityAttributeProperties.add(ENTITY_VERSION_PROP);
        entityAttributeProperties.add(BASIC_STRING_PROP);
        Map<String, Object> root = createEntityRootmap(entityAttributeProperties);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.EDIT_ENTITY_CONTROLLER_JS));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

        entityAttributeProperties.add(ENTITY_VERSION_PROP);
        entityAttributeProperties.add(BASIC_STRING_PROP);
        Map<String, Object> root = createEntityRootmap(entityAttributeProperties);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.SEARCH_ENTITY_CONTROLLER_JS));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

        entityAttributeProperties.add(ENTITY_VERSION_PROP);
        entityAttributeProperties.add(BASIC_STRING_PROP);
        Map<String, Object> root = createEntityRootmap(entityAttributeProperties);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.ENTITY_FACTORY));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

        entityAttributeProperties.add(ENTITY_VERSION_PROP);
        entityAttributeProperties.add(BASIC_STRING_PROP);
        Map<String, Object> root = createEntityRootmap(entityAttributeProperties);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.DETAIL_VIEW));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

        entityAttributeProperties.add(ENTITY_VERSION_PROP);
        entityAttributeProperties.add(BASIC_STRING_PROP);
        Map<String, Object> root = createEntityRootmap(entityAttributeProperties);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.SEARCH_VIEW));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

    @Test
    public void testGenerateIndex() throws Exception {
        Map<String, Object> root = createGlobalRootmap();

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.INDEX_PAGE));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

    @Test
    public void testGenerateAngularApplication() throws Exception {
        Map<String, Object> root = createGlobalRootmap();

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.APP_JS));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output, IsNull.notNullValue());
    }
View Full Code Here

    @Test
    public void testGenerateHiddenProperty() throws Exception {
        Map<String, Object> root = createInspectionResultWrapper(ENTITY_NAME, ENTITY_VERSION_PROP);

        Resource<URL> templateResource = resourceFactory.create(getClass().getResource(Deployments.BASE_PACKAGE_PATH + Deployments.N_TO_MANY_PROPERTY_DETAIL_INCLUDE));
        Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
        String output = processor.process(root);
        assertThat(output.trim(), IsEqual.equalTo(""));
    }
View Full Code Here

TOP

Related Classes of org.jboss.forge.addon.templates.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.