本文整理匯總了Java中com.xtremelabs.robolectric.shadows.ShadowActivity類的典型用法代碼示例。如果您正苦於以下問題:Java ShadowActivity類的具體用法?Java ShadowActivity怎麽用?Java ShadowActivity使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ShadowActivity類屬於com.xtremelabs.robolectric.shadows包,在下文中一共展示了ShadowActivity類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: shouldStartResultActivityWhenOK
import com.xtremelabs.robolectric.shadows.ShadowActivity; //導入依賴的package包/類
@Test
public void shouldStartResultActivityWhenOK() throws ParserException {
InstructionsParserAsync async = activity.new InstructionsParserAsync();
async.onPostExecute(Mockito.mock(InstructionsParser.class));
ShadowActivity shadowActivity = Robolectric.shadowOf(activity);
Intent startedIntent = shadowActivity.getNextStartedActivity();
ShadowIntent shadowIntent = Robolectric.shadowOf(startedIntent);
assertThat(shadowIntent.getComponent().getClassName()).isEqualTo(ResultActivity.class.getName());
}
示例2: ActivityAssert
import com.xtremelabs.robolectric.shadows.ShadowActivity; //導入依賴的package包/類
public ActivityAssert(ShadowActivity actual) {
super(actual, ActivityAssert.class);
}
示例3: assertThat
import com.xtremelabs.robolectric.shadows.ShadowActivity; //導入依賴的package包/類
public static ActivityAssert assertThat(ShadowActivity actual) {
return new ActivityAssert(actual);
}