Whitebox.getInternalState()
Similar to setInternalState()
you can get value of any global field at my time with getInternalState()
method.
This method is really useful to test any void methods, we can get any state change caused by that void method and write our assertion on that.
for example:
With method's like clear()
that return void but change state of class, we can get value of mHeight
and check if it was unset or not.
Here is how we would achieve that:
Last updated