public interface ViewAssertion
android.support.test.espresso.ViewAssertion |
负责在View元素上执行断言。
这被认为是测试框架公共API的一部分 - 只要满足以下要求,开发人员可以自由编写自己的断言:
在编写自己的断言之前,请强烈考虑通过ViewAssertions实用程序类使用现有的ViewAssertion。
Public methods |
|
---|---|
abstract void |
check(View view, NoMatchingViewException noViewFoundException) 检查给定视图的状态(如果存在这样的视图)。 |
void check (View view, NoMatchingViewException noViewFoundException)
检查给定视图的状态(如果存在这样的视图)。
Parameters | |
---|---|
view |
View : the view, if one was found during the view interaction or null if it was not (which may be an acceptable option for an assertion) |
noViewFoundException |
NoMatchingViewException : an exception detailing why the view could not be found or null if the view was found |