I want to unit test an Android Fragment class.
Can I set up a test using AndroidTestCase or do I need to use ApplicationTestCase?
Are there any useful exampl
I'm pretty sure you can do what you're saying, create a mock Activity and test the fragment from there. You just gotta export the compatibility library in the main project and you'll be able to access the fragments from the test project. I'm gonna create a sample project and test the code here and will update my answer based on what I find out.
For more details on how to export the compatibility library, check here.