Search in sources :

Example 6 with StringResource

use of org.thymeleaf.resource.StringResource in project thymeleaf-tests by thymeleaf.

the class ElementProcessorIteratorTest method computeHtmlTag.

private static TagObtentionTemplateHandler computeHtmlTag(final String input, final Set<IDialect> dialects) {
    final String templateName = "test";
    final TagObtentionTemplateHandler handler = new TagObtentionTemplateHandler();
    final IEngineConfiguration templateEngineContext = TestTemplateEngineConfigurationBuilder.build(dialects);
    HTML_PARSER.parse(templateEngineContext, TemplateMode.HTML, new StringResource(templateName, input), handler);
    return handler;
}
Also used : StringResource(org.thymeleaf.resource.StringResource) IEngineConfiguration(org.thymeleaf.IEngineConfiguration)

Example 7 with StringResource

use of org.thymeleaf.resource.StringResource in project thymeleaf-tests by thymeleaf.

the class OpenElementTagTest method computeXmlTag.

private static IOpenElementTag computeXmlTag(final String input) {
    final String templateName = "test";
    final TagObtentionTemplateHandler handler = new TagObtentionTemplateHandler();
    XML_PARSER.parse(TEMPLATE_ENGINE_CONFIGURATION, TemplateMode.XML, new StringResource(templateName, input), handler);
    return handler.tag;
}
Also used : StringResource(org.thymeleaf.resource.StringResource)

Example 8 with StringResource

use of org.thymeleaf.resource.StringResource in project thymeleaf-tests by thymeleaf.

the class OpenElementTagTest method computeHtmlTag.

private static IOpenElementTag computeHtmlTag(final String input) {
    final String templateName = "test";
    final TagObtentionTemplateHandler handler = new TagObtentionTemplateHandler();
    HTML_PARSER.parse(TEMPLATE_ENGINE_CONFIGURATION, TemplateMode.HTML, new StringResource(templateName, input), handler);
    return handler.tag;
}
Also used : StringResource(org.thymeleaf.resource.StringResource)

Example 9 with StringResource

use of org.thymeleaf.resource.StringResource in project thymeleaf-tests by thymeleaf.

the class StandaloneElementTagTest method computeXmlTag.

private static IStandaloneElementTag computeXmlTag(final String input) {
    final String templateName = "test";
    final TagObtentionTemplateHandler handler = new TagObtentionTemplateHandler();
    XML_PARSER.parse(TEMPLATE_ENGINE_CONFIGURATION, TemplateMode.XML, new StringResource(templateName, input), handler);
    return handler.tag;
}
Also used : StringResource(org.thymeleaf.resource.StringResource)

Example 10 with StringResource

use of org.thymeleaf.resource.StringResource in project thymeleaf-tests by thymeleaf.

the class StandaloneElementTagTest method computeHtmlTag.

private static IStandaloneElementTag computeHtmlTag(final String input) {
    final String templateName = "test";
    final TagObtentionTemplateHandler handler = new TagObtentionTemplateHandler();
    HTML_PARSER.parse(TEMPLATE_ENGINE_CONFIGURATION, TemplateMode.HTML, new StringResource(templateName, input), handler);
    return handler.tag;
}
Also used : StringResource(org.thymeleaf.resource.StringResource)

Aggregations

StringResource (org.thymeleaf.resource.StringResource)12 StringWriter (java.io.StringWriter)2 IEngineConfiguration (org.thymeleaf.IEngineConfiguration)2 Context (org.thymeleaf.context.Context)1 ProcessingContext (org.thymeleaf.context.ProcessingContext)1 ITemplateHandler (org.thymeleaf.engine.ITemplateHandler)1 OutputTemplateHandler (org.thymeleaf.engine.OutputTemplateHandler)1