开发者

How to mix Android JUnit classes with plain JUnit classes in same project

Is it possible to have both Android JUnit classes (i.e. extends ActivityInstrumentationTestCase2<>) with plain JUnit classes (i.e. extends TestCase) in the same pro开发者_Python百科ject?

Some of the classes in my app are "generic" (i.e. do not require an activity or the emulator to be tested) and I would like to created test cases for them, but without having to create a separate test project.

Is this possible?


Yes, you can. There should be no problem in having different super classes in the same test project.


See this http://marakana.com/tutorials/android/junit-test-example.html

This is the best tutorial I have found on the subject.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜