How to use AdapterViewProtocol in espresso?

≡放荡痞女 提交于 2019-12-11 10:34:19

问题


I use Espresso 2.0 library to test an Android project, and I need to use method onData, but I have custom ProductsAdapter, so I must implement AdapterViewProtocol (android.support.test.espresso.action.AdapterViewProtocol),

I need to find a working example implementing AdapterViewProtocol for onData method.

I have only found this: https://gist.github.com/brennantaylor/9379399. But I want small and working project. Help me, please.


回答1:


You can try to look at this example with CursorAdapter: https://gist.github.com/brennantaylor/9379399 .

Or in standard Espresso implementation: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.0_r1/com/google/android/apps/common/testing/ui/espresso/action/AdapterViewProtocols.java#AdapterViewProtocols.StandardAdapterViewProtocol



来源:https://stackoverflow.com/questions/28860001/how-to-use-adapterviewprotocol-in-espresso

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!