--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To view this discussion on the web visit https://groups.google.com/d/msg/powermock/-/TvJ8x11R6MEJ.
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.
I have tried this and the test doesn't want to compile due to the class not being visible in the package of the test. Am I missing anything?
On Friday, May 11, 2012 11:32:46 AM UTC-4, Johan Haleby wrote:
Yes you can specify the fully-qualified name to the class in the @PrepareForTest annotation.
/Johan
On Thu, May 10, 2012 at 10:52 PM, Phuong Hoang <hoang.l...@gmail.com> wrote:
Hi,
Is there a way to provide mock for package-private class using powermock? If it is not possible, is there any other alternatives?
Thanks
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To view this discussion on the web visit https://groups.google.com/d/msg/powermock/-/TvJ8x11R6MEJ.
To post to this group, send email to powe...@googlegroups.com.
To unsubscribe from this group, send email to powermock+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/powermock?hl=en.
This email message and any attachments may contain confidential, proprietary or non-public information. The information is intended solely for the designated recipient(s). If an addressing or transmission error has misdirected this email, please notify the sender immediately and destroy this email. Any review, dissemination, use or reliance upon this information by unintended recipients is prohibited. Any opinions expressed in this email are those of the author personally.
--
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To view this discussion on the web visit https://groups.google.com/d/msg/powermock/-/bEVZ8cV2Sc8J.
If the test doesn't even compile you need to move the test class to the same structure package where the package-private class is located (if this is the class you're testing) but in the test folder. I.e. if your package private class under test is in src/main/java/x/y/MyClass then your test should be in src/test/java/x/y/MyClassSpec
/Johan
To view this discussion on the web visit https://groups.google.com/d/msg/powermock/-/8wyt6DNg4uwJ.
To unsubscribe from this group, send email to powermock+...@googlegroups.com.