My idea is to create a category of UIActionSheet
in order to be able to mock the different possible user interactions (select item / cancel) and to check the correct initialization.
I was hoping that by importing the category that I created into my test, all farther usages of UIActionSheet
are going to be through that category, but it's not the case. Has anyone had similar experience? What other ways do you suggest to do UI mocking?
@interface UIActionSheet (LMActionSheetMonkey)
bla bla
@end
Another idea is to import the category in the class using #ifdef TESTAPP
, but i'm trying to affect my actual implementation for the sake of testing.