Closed GoogleCodeExporter closed 8 years ago
Hi,
First I must warn you, using Whitebox, which is an internal tool, is dangerous
because we can change behavior, signature or even remove it whenever we feel it
it's necessary. Plus as it's internal it isn't properly documented.
The code shows that it isn't doing what you expect in this line
`Whitebox.setInternalState(myclass.class, "config", mockConfiguration);`. You''
need to pass the MyClass instance, not the class. I believe the stacktrace show
a Caused By, that probably explains more what's happening.
FieldSetter is more appropriate I believe for what you want to achieve, still
it's an internal class, and there fore subject to change.
Hope that helps
Cheers,
Brice
Original comment by brice.du...@gmail.com
on 4 Dec 2012 at 3:14
Hello Brice,
thank you for your respponse. It was really helpfull.
I'm new in JUnit and Mockito
Svetlana
Original comment by sedona...@gmail.com
on 5 Dec 2012 at 10:38
it was really helpful..
Original comment by coolneha...@gmail.com
on 18 Dec 2014 at 11:39
Original issue reported on code.google.com by
sedona...@gmail.com
on 4 Dec 2012 at 2:50