Most visited

Recently visited

Added in API level 1
Deprecated since API level 24

SyncBaseInstrumentation

public class SyncBaseInstrumentation
extends InstrumentationTestCase

java.lang.Object
    junit.framework.Assert
      junit.framework.TestCase
        android.test.InstrumentationTestCase
          android.test.SyncBaseInstrumentation


此类在API级别24中已被弃用。
改为使用InstrumentationRegistry 新的测试应该使用Android Testing Support Library编写

如果您想要测试与 InstrumentationTestCase同步的单个供应商, InstrumentationTestCase提供 setUp()tearDown()一些锅炉板。

摘要(Summary)

Public constructors

SyncBaseInstrumentation()

Protected methods

void cancelSyncsandDisableAutoSync()
void setUp()

设置夹具,例如打开网络连接。

void syncProvider(Uri uri, String accountName, String authority)

同步指定的提供商。

继承方法(Inherited methods)

From class android.test.InstrumentationTestCase
From class junit.framework.TestCase
From class junit.framework.Assert
From class java.lang.Object
From interface junit.framework.Test

Public constructors

SyncBaseInstrumentation

Added in API level 1
SyncBaseInstrumentation ()

Protected methods

cancelSyncsandDisableAutoSync

Added in API level 1
void cancelSyncsandDisableAutoSync ()

setUp

Added in API level 1
void setUp ()

设置夹具,例如打开网络连接。 在执行测试之前调用此方法。

抛出异常(Throws)
异常

syncProvider

Added in API level 1
void syncProvider (Uri uri, 
                String accountName, 
                String authority)

同步指定的提供商。

参数(Parameters)
uri Uri
accountName String
authority String
抛出异常(Throws)
异常

Hooray!