Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for custom template modes #4

Open
Kleeven81 opened this issue Dec 9, 2013 · 1 comment
Open

Support for custom template modes #4

Kleeven81 opened this issue Dec 9, 2013 · 1 comment

Comments

@Kleeven81
Copy link

Currently it is not possible to use a custom template mode in the testing framework making it impossible to test your own template modes. It would be nice if we could add them in the same way we can add our own Dialects.

@Kleeven81
Copy link
Author

I've made a fork and written a simple solution:

  • Added a private list of ITemplateModeHandler
  • Added getter and setter for the list
  • Added addTemplateModeHandler method to add a single handler for convenience
  • during private void execute(final ITestable testable, final TestExecutionContext context) I add all handlers in the list to the TemplateEngine before it is added to the context

I'd be happy to do a pull request but I ran into the following: I wanted to add unit tests for the new code but I couldn't really find where to put them since the tests in https://github.com/thymeleaf/thymeleaf-tests seem to be sorted on functionality instead of package and class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant