How to test for the implementation of toString()
Update: This entry has been crossposted to the transylvania-jug blog.
Problem statement: you have some value objects for which you implemented toString() (for debugging purposes) and now you would like to test using a unit test that these implementations exist.
Possible solutions:
-
Use reflection to detect the existence of the ...

“eval” (short for evaluate) is usually the name given to the method in
dynamic languages which makes it possible for the programmer to access
the compiler / runtime. Here are a few links to the documentation for
the function in different languages:
I don’t want to write a “considered harmful” article (because
There is a lot of debate on the intertubes if one should or shouldn’t
use wildcard imports. I’m mostly indifferent to the discussion (mainly
because all the package references are resolved compile time – so there
is no performance overhead – and because today’s