Most visited

Recently visited

Added in API level 1
Deprecated since API level 24

MockDialogInterface

public class MockDialogInterface
extends Object implements DialogInterface

java.lang.Object
    android.test.mock.MockDialogInterface


此类在API级别24中已被弃用。
使用模拟框架,如Mockito 。 新的测试应该使用Android Testing Support Library编写 。

模拟DialogInterface类。 所有方法都不起作用并抛出UnsupportedOperationException 。 重写它以提供您需要的操作。

摘要(Summary)

Inherited constants

From interface android.content.DialogInterface

Public constructors

MockDialogInterface()

公共方法(Public methods)

void cancel()
void dismiss()

继承方法(Inherited methods)

From class java.lang.Object
From interface android.content.DialogInterface

Public constructors

MockDialogInterface

Added in API level 1
MockDialogInterface ()

公共方法(Public methods)

cancel

Added in API level 1
void cancel ()

dismiss

Added in API level 1
void dismiss ()

Hooray!