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


Java Intents.intended方法代码示例

本文整理汇总了Java中android.support.test.espresso.intent.Intents.intended方法的典型用法代码示例。如果您正苦于以下问题:Java Intents.intended方法的具体用法?Java Intents.intended怎么用?Java Intents.intended使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.test.espresso.intent.Intents的用法示例。


在下文中一共展示了Intents.intended方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testStartsLogInActivity

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testStartsLogInActivity() throws Exception {
    onView(withId(R.id.pager)).perform(swipeLeft());
    onView(withId(R.id.pager)).perform(swipeLeft());
    onView(withId(R.id.btn_walkthrough)).perform(click());

    Intents.intended(hasComponent(LogInActivity.class.getName()));
}
 
开发者ID:ArturVasilov,项目名称:AndroidArchitecture,代码行数:9,代码来源:WalkthroughActivityTest.java

示例2: testErrorThenCorrect

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testErrorThenCorrect() throws Exception {
    errorInputAndClick();

    onView(LOGIN_INPUT_LAYOUT).check(matches(withInputError(R.string.error)));

    clearInputs();

    correctInputAndClick();
    Intents.intended(hasComponent(RepositoriesActivity.class.getName()));
}
 
开发者ID:ArturVasilov,项目名称:AndroidArchitecture,代码行数:12,代码来源:LogInActivityTest.java

示例3: testRecipeAnalysis

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testRecipeAnalysis() {
    when(repository.getRecipeAnalysisData(ArgumentMatchers.<RecipeAnalysisParams>any()))
            .thenReturn(Single.just(AssetUtils.getRecipeAnalysisResult(context)));

    rule.launchActivity(new Intent());

    selectTab();
    inputFields();

    onView(withId(R.id.btn_analyze)).perform(click());
    Intents.intended(IntentMatchers.hasComponent(RecipeAnalysisDetailsActivity.class.getName()));
}
 
开发者ID:MLSDev,项目名称:RecipeFinderJavaVersion,代码行数:14,代码来源:RecipeAnalysisFragmentTest.java

示例4: testClickOnItem

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testClickOnItem() throws Exception {
    onView(withId(R.id.recyclerView))
            .perform(actionOnItemAtPosition(14, click()));

    Intents.intended(hasComponent(CommitsActivity.class.getName()));
}
 
开发者ID:ArturVasilov,项目名称:AndroidSchool,代码行数:8,代码来源:RepositoriesActivityTest.java

示例5: testSuccessAuth

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testSuccessAuth() throws Exception {
    onView(withId(R.id.loginEdit)).perform(typeText("login"));
    closeSoftKeyboard();
    onView(withId(R.id.passwordEdit)).perform(typeText("pass"));
    closeSoftKeyboard();
    onView(withId(R.id.logInButton)).perform(click());

    IdlingResource idlingResource = TimeIdlingResource.timeout(4000);
    Intents.intended(hasComponent(RepositoriesActivity.class.getName()));
    Espresso.unregisterIdlingResources(idlingResource);

}
 
开发者ID:ArturVasilov,项目名称:AndroidSchool,代码行数:14,代码来源:AuthActivityTest.java

示例6: testLogInCorrect

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
@Test
public void testLogInCorrect() throws Exception {
    correctInputAndClick();
    Intents.intended(hasComponent(
            RepositoriesActivity.class.getName()));
}
 
开发者ID:ArturVasilov,项目名称:AndroidArchitecture,代码行数:7,代码来源:LogInActivityTest.java

示例7: shouldLoginWithSkip

import android.support.test.espresso.intent.Intents; //导入方法依赖的package包/类
public void shouldLoginWithSkip() {
    onView(withId(R.id.emailEditText)).check(matches(isDisplayed()));
    onView(withId(R.id.passwordEditText)).perform(typeText("[email protected]"));
    onView(withId(R.id.signupButton)).perform(click());
    Intents.intended(IntentMatchers.hasComponent(MainActivity.class.getName()));
}
 
开发者ID:RandoApp,项目名称:Rando-android,代码行数:7,代码来源:AuthActivityTest.java


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