You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to figure out how to verify that we will be formatting a LocalDateTime appropriately in our Thymeleaf template. There is one approach that we would like feedback on. We would like to write as lightweight of a test as possible that would still give us the assurance that we are invoking Thymeleaf correctly to render the right text (using the ${{...}} syntax) and that we have the correct converters registered.
Here is the approach we would like feed back on: Write a mockMvc test that renders the page. If there is a conversion service registered to handle a LocalDateTime, the page renders fine. If there is no conversion service converter to handle a LocalDateTime then Thymleaf throws an exception.
Is there a way to configure Thymeleaf to do this? Unfortunately it appears that the SpringStandardConversionServicewon't allow this
Or is this configurable behavior that could be added to thymeleaf for testing purposes?
Thanks!
The text was updated successfully, but these errors were encountered:
Hello!
We are trying to figure out how to verify that we will be formatting a LocalDateTime appropriately in our Thymeleaf template. There is one approach that we would like feedback on. We would like to write as lightweight of a test as possible that would still give us the assurance that we are invoking Thymeleaf correctly to render the right text (using the
${{...}}
syntax) and that we have the correct converters registered.Here is the approach we would like feed back on: Write a mockMvc test that renders the page. If there is a conversion service registered to handle a
LocalDateTime
, the page renders fine. If there is no conversion service converter to handle aLocalDateTime
then Thymleaf throws an exception.Is there a way to configure Thymeleaf to do this? Unfortunately it appears that the
SpringStandardConversionService
won't allow thisOr is this configurable behavior that could be added to thymeleaf for testing purposes?
Thanks!
The text was updated successfully, but these errors were encountered: