I want to use the assertion in production code to validate the input for private methods as this article recommends:
Assertion best practices.
And I’m looking for a good thin wrapping code that i can use. I’m sure someone wrote it before me.
Do you know any good open source that does it?
I want the wrapper to organize the failure string for example. So it would be uniform to search it on the logs.
Thanks!
p.s. is it a bad practice to use the JUnit on producation code?
Look into AspectJ (or other similar aspect-oriented products). You can simply include an annotation to the method to call one of your pointcuts to automatically check the inputs.