本文整理汇总了Java中com.xtremelabs.robolectric.Robolectric.bindShadowClass方法的典型用法代码示例。如果您正苦于以下问题:Java Robolectric.bindShadowClass方法的具体用法?Java Robolectric.bindShadowClass怎么用?Java Robolectric.bindShadowClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.xtremelabs.robolectric.Robolectric
的用法示例。
在下文中一共展示了Robolectric.bindShadowClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowActivity.class);
// Our mock event manager - we'll check on it for fired events
mockEventManager = mock(EventManager.class);
// initialize RoboGuice
RoboGuice.setBaseApplicationInjector(Robolectric.application,
Stage.DEVELOPMENT,
RoboGuice.newDefaultRoboModule(Robolectric.application),
new TestModule(mockEventManager));
// Our activity under test
activity = activityClass.newInstance();
// We need to initialize it
call("onCreate", Bundle.class, null);
}
示例2: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowTabActivity.class);
super.setUp();
}
示例3: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowActivityGroup.class);
super.setUp();
}
示例4: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowListActivity.class);
super.setUp();
}
示例5: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowMapActivity.class);
super.setUp();
}
示例6: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowFragmentActivity.class);
super.setUp();
}
示例7: setUp
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
// We want to skip the real functionality of Activity (even though it's
// shadowed and just test the firing of events)
Robolectric.bindShadowClass(ShadowPreferenceActivity.class);
super.setUp();
}
示例8: bindShadowClasses
import com.xtremelabs.robolectric.Robolectric; //导入方法依赖的package包/类
@Override
protected void bindShadowClasses() {
super.bindShadowClasses();
Robolectric.bindShadowClass(ShadowSherlockActivity.class);
}