Hi, sorry if it is a stupid question, but is it possible to verify a
protected method has been called?
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To post to this group, send email to powe...@googlegroups.com.
To unsubscribe from this group, send email to powermock+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/powermock?hl=en.
Just curious ... why not? I don't see how anyone or anything could
prevent you from putting a *test* class in the same package as the
class under test. I always do this.
--
--
Even though that's a best practice? To be clear, we're talking about
using the same *package* not the same *directory*:
src/main/java/org/example/TheClass.java
src/test/java/org/example/TheClassTest.java
so there is no mixing of test and production code. This really makes
testing easier because you have access to protected and package
private methods/members.
Count yourself lucky ... at least you *have* some unit tests. I had to
maintain a mountain of legacy code with just 5(!) unit tests. And none
of them worked. :-)
--