I am trying to set up some tests for some existing code and need to be able to mock things like ViewFlipper.FindViewById
.
So far to do this I have had to create a mockable wrapper for the ViewFlipper
. Now the issue I have is that I want to return a mocked view. The mocked view needs to have a Context passed into it's ctor. I have found the MockableContext
class in the Java.Test
namespace but it doesn't seem to like being newed up? I get null ref exceptions?
Should I be able to use this class in this manner? Is there another way to do this? Simply creating a new Mock<Context>
doesn't work either :/