当前位置: 首页>>代码示例>>Java>>正文


Java MoreAsserts.assertAssignableFrom方法代码示例

本文整理汇总了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 ) );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:8,代码来源:TunLoaderFactoryImplTest.java

示例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 ) );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:8,代码来源:TunLoaderFactoryImplTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:8,代码来源:TunLoaderFactoryImplTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:8,代码来源:TunLoaderPreferencesTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:8,代码来源:TunLoaderPreferencesTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:10,代码来源:TunLoaderPreferencesTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:9,代码来源:TunLoaderPreferencesTest.java

示例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 ) );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:9,代码来源:TunLoaderPreferencesTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:9,代码来源:TunLoaderPreferencesTest.java

示例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 ) );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:7,代码来源:TunLoaderFactoryImplTest.java

示例11: test_createModprobe

import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createModprobe()
{
    MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.LoadTunViaModprobe.class, new TunLoaderFactoryImpl().createModprobe() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:5,代码来源:TunLoaderFactoryImplTest.java

示例12: test_createNullTunLoader

import android.test.MoreAsserts; //导入方法依赖的package包/类
public void test_createNullTunLoader()
{
    MoreAsserts.assertAssignableFrom( TunLoaderFactoryImpl.NullTunLoader.class, new TunLoaderFactoryImpl().createNullTunLoader() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:5,代码来源:TunLoaderFactoryImplTest.java

示例13: testGetTunInfo

import android.test.MoreAsserts; //导入方法依赖的package包/类
public void testGetTunInfo() throws Exception
{
    MoreAsserts.assertAssignableFrom( TunInfoImpl.class, TunInfoSingleton.get().getTunInfo( getInstrumentation().getContext() ) );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:5,代码来源:TunInfoSingletonTest.java

示例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() );
}
 
开发者ID:serega1983,项目名称:android-openvpn-settings,代码行数:7,代码来源:TunLoaderPreferencesTest.java


注:本文中的android.test.MoreAsserts.assertAssignableFrom方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。