>That's how you have to do it.
>
>>The problem with this approach, though, that I had to make all my methods public in order to test them.
I am reading this article now
http://www.peterprovost.org/blog/2012/05/31/my-take-on-unit-testing-private-methodsand I am wondering what exactly this means:
Making a class or method public does not make it a part of your public API. You can mark is as “for internal use only” with various attributes or code constructs (depending on your language). You can put it into an “internals only” package or namespace. You can simply document it in your docs as being “internal use only”.
--------------------
Do you know what attributes I can use here? I'll make a research on this myself later, but may be you can answer right away.
If it's not broken, fix it until it is.
My Blog