本文整理汇总了Java中android.test.MoreAsserts.assertAssignableFrom方法的典型用法代码示例。如果您正苦于以下问题:Java MoreAsserts.assertAssignableFrom方法的具体用法?Java MoreAsserts.assertAssignableFrom怎么用?Java MoreAsserts.assertAssignableFrom使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.test.MoreAsserts
的用法示例。
在下文中一共展示了MoreAsserts.assertAssignableFrom方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test_createFromLegacyDefinition__should_return_LoadTunViaModprobe
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createFromLegacyDefinition__should_return_LoadTunViaModprobe()
{
TunPreferences.setDoModprobeTun( context, true );
TunPreferences.setModprobeAlternativeToModprobe( preferences );
TunPreferences.setPathToTun( preferences, new File( "tun" ) );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobe.class, TunLoaderFactoryImpl.createFromLegacyDefinition( preferences ) );
}
示例2: test_createFromLegacyDefinition__should_return_LoadTunViaModprobeWithParameter
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createFromLegacyDefinition__should_return_LoadTunViaModprobeWithParameter()
{
TunPreferences.setDoModprobeTun( context, true );
TunPreferences.setModprobeAlternativeToModprobe( preferences );
TunPreferences.setPathToTun( preferences, PATH1 );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobeWithParameter.class, TunLoaderFactoryImpl.createFromLegacyDefinition( preferences ) );
}
示例3: test_createInsmod
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createInsmod()
{
File pathToModule = new File( "/lib/modules/tun.ko-"+System.currentTimeMillis() );
TunLoader insmod = new TunLoaderFactoryImpl().createInsmod( pathToModule );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaInsmod.class, insmod );
Assert.assertEquals( pathToModule, insmod.getPathToModule() );
}
示例4: test_createTunLoader_type_NONE
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_NONE()
{
preferences.setTypeToNone();
TunLoader tunLoader = preferences.createTunLoader();
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.NullTunLoader.class, tunLoader );
Assert.assertFalse( tunLoader.hasPathToModule() );
}
示例5: test_createTunLoader_type_MODPROBE
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_MODPROBE()
{
preferences.setTypeToModprobe();
TunLoader tunLoader = preferences.createTunLoader();
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobe.class, tunLoader );
Assert.assertFalse( tunLoader.hasPathToModule() );
}
示例6: test_createTunLoader_type_INSMOD
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_INSMOD()
{
final String uniqueFileName = "/system/lib/modules/tun.ko-" + System.currentTimeMillis();
preferences.setTypeToInsmod( new File( uniqueFileName ) );
TunLoader tunLoader = preferences.createTunLoader();
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaInsmod.class, tunLoader );
Assert.assertTrue( tunLoader.hasPathToModule() );
Assert.assertEquals( new File( uniqueFileName ), tunLoader.getPathToModule() );
}
示例7: test_createTunLoader_type_LEGACY_modprobe
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_LEGACY_modprobe()
{
preferences.setTypeToLegacy();
TunPreferences.setDoModprobeTun( context, true );
TunPreferences.setModprobeAlternativeToModprobe( sharedPreferences );
TunPreferences.setPathToTun( sharedPreferences, new File( "tun" ) );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobe.class, preferences.createTunLoader() );
}
示例8: test_createTunLoader_type_LEGACY_modprobe_with_parameter
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_LEGACY_modprobe_with_parameter()
{
preferences.setTypeToLegacy();
TunPreferences.setDoModprobeTun( context, true );
TunPreferences.setModprobeAlternativeToModprobe( sharedPreferences );
TunPreferences.setPathToTun( sharedPreferences, new File( "/system/lib/modules/tun.ko" ) );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobeWithParameter.class, TunLoaderFactoryImpl.createFromLegacyDefinition( sharedPreferences ) );
}
示例9: test_createTunLoader_type_LEGACY_insmod
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_LEGACY_insmod()
{
preferences.setTypeToLegacy();
TunPreferences.setDoModprobeTun( context, true );
TunPreferences.setModprobeAlternativeToInsmod( sharedPreferences );
TunPreferences.setPathToTun( sharedPreferences, new File( "/system/lib/modules/tun.ko" ) );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaInsmod.class, preferences.createTunLoader() );
}
示例10: test_createFromLegacyDefinition__should_return_LoadTunViaInsmod
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createFromLegacyDefinition__should_return_LoadTunViaInsmod()
{
TunPreferences.setDoModprobeTun( context, true );
TunPreferences.setModprobeAlternativeToInsmod( preferences );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaInsmod.class, TunLoaderFactoryImpl.createFromLegacyDefinition( preferences ) );
}
示例11: test_createModprobe
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createModprobe()
{
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobe.class, new TunLoaderFactoryImpl().createModprobe() );
}
示例12: test_createNullTunLoader
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createNullTunLoader()
{
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.NullTunLoader.class, new TunLoaderFactoryImpl().createNullTunLoader() );
}
示例13: testGetTunInfo
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void testGetTunInfo() throws Exception
{
MoreAsserts.assertAssignableFrom( TunInfoImpl.class, TunInfoSingleton.get().getTunInfo( getInstrumentation().getContext() ) );
}
示例14: test_createTunLoader_type_LEGACY_with_doModprobe_false_returns_NullTunLoader
import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createTunLoader_type_LEGACY_with_doModprobe_false_returns_NullTunLoader()
{
preferences.setTypeToLegacy();
TunPreferences.setDoModprobeTun( context, false );
MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.NullTunLoader.class, preferences.createTunLoader() );
}