yandex-qatools / hamcrest-pojo-matcher-generator

Autogenerated java hamcrest matchers for pojo with help of AnnotationProcessor
Apache License 2.0
33 stars 8 forks source link

Transform GenUtils to the real util-class #14

Closed vbauer closed 9 years ago

lanwen commented 9 years ago

this was originally done to simplify mocking and debug. Also it helps to use it in templates. Please view at the https://github.com/yandex-qatools/hamcrest-pojo-matcher-generator/blob/master/feature-matcher-generator/src/main/resources/templates/method.vm#L6 with${utils.normalize(${field.name()})}

Does it works fine with class reference instead of object?

vbauer commented 9 years ago

this was originally done to simplify mocking and debug.

I'm not sure that it is necessary to mock this class.. It doesn't have an integration with some complex components.

Also it helps to use it in templates. Please view at the https://github.com/yandex-qatools/hamcrest-pojo-matcher-generator/blob/master/feature-matcher-generator/src/main/resources/templates/method.vm#L6 with${utils.normalize(${field.name()})}

Yes, it works fine with Velocity engine: http://velocity.apache.org/engine/devel/developer-guide.html#supportforstaticclasses

lanwen commented 9 years ago

:+1: