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


Java LargeTest类代码示例

本文整理汇总了Java中android.support.test.filters.LargeTest的典型用法代码示例。如果您正苦于以下问题:Java LargeTest类的具体用法?Java LargeTest怎么用?Java LargeTest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: testSaveAndRestorePasswordVisibility

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testSaveAndRestorePasswordVisibility() throws Throwable {
  // Type some text on the EditText
  onView(withId(R.id.textinput_edittext_pwd)).perform(typeText(INPUT_TEXT));
  onView(withId(R.id.textinput_password)).check(isPasswordToggledVisible(false));

  // Toggle password to be shown as plain text
  onView(withId(R.id.textinput_password)).perform(clickPasswordToggle());
  onView(withId(R.id.textinput_password)).check(isPasswordToggledVisible(true));

  RecreatableAppCompatActivity activity = activityTestRule.getActivity();
  ActivityUtils.recreateActivity(activityTestRule, activity);
  ActivityUtils.waitForExecution(activityTestRule);

  // Check that the password is still toggled to be shown as plain text
  onView(withId(R.id.textinput_password)).check(isPasswordToggledVisible(true));
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:19,代码来源:TextInputLayoutTest.java

示例2: checkProfileTest

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void checkProfileTest() throws InterruptedException{
    Thread.sleep(6000);
    mFireBaseDatabase = FirebaseDatabase.getInstance();
    mUsersDatabaseReference = mFireBaseDatabase.getReference().child("users");
    FirebaseApp.initializeApp(rule.getActivity());
    mAuth = FirebaseAuth.getInstance();

    Looper.prepare();
    final MainActivity obj = new MainActivity();

    if(mAuth.getCurrentUser() != null){

        final String user_id = mAuth.getCurrentUser().getUid();
        mUsersDatabaseReference.addValueEventListener(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {
                if(!dataSnapshot.hasChild(user_id)){
                    obj.startActivity(new Intent(obj.getApplicationContext(), CreateProfileActivity.class));
                    obj.finish();
                }
            }
            @Override
            public void onCancelled(DatabaseError databaseError) {

            }
        });
    }
    Thread.sleep(4000);
}
 
开发者ID:Socialate,项目名称:furry-sniffle,代码行数:32,代码来源:MainTest1.java

示例3: verifySilenceDuringPresentationStoring

import android.support.test.filters.LargeTest; //导入依赖的package包/类
/**
 * Verify that the "Silence during presentation" setting is correctly stored and restored
 * on activity loading.
 *
 * @throws InterruptedException If sleep times fail
 */
@Test
@LargeTest
@RequiresDevice
public void verifySilenceDuringPresentationStoring() throws InterruptedException {
    onView(withId(R.id.silenceDuringPresentation))
            .perform(click());
    Thread.sleep(1000);
    onView(withId(R.id.silenceDuringPresentation))
            .check(matches(isChecked()));

    settingsActivityRule.getActivity().onStop();
    settingsActivityRule.getActivity().finish();
    Thread.sleep(1000);
    assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));

    settingsActivityRule.launchActivity(null);
    onView(withId(R.id.silenceDuringPresentation))
            .check(matches(isChecked()))
            .perform(click());
    Thread.sleep(1000);
    onView(withId(R.id.silenceDuringPresentation))
            .check(matches(isNotChecked()));

    settingsActivityRule.getActivity().onStop();
    settingsActivityRule.getActivity().finish();
    Thread.sleep(1000);
    assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));

    settingsActivityRule.launchActivity(null);
    onView(withId(R.id.silenceDuringPresentation)).check(matches(isNotChecked()));
}
 
开发者ID:FelixWohlfrom,项目名称:Presenter-Client-Android,代码行数:38,代码来源:SettingsActivityTest.java

示例4: verifyUseVolumeKeysForNavigationStoring

import android.support.test.filters.LargeTest; //导入依赖的package包/类
/**
 * Verify that the "Use volume keys for navigation" setting is correctly stored and restored
 * on activity loading.
 *
 * @throws InterruptedException If sleep times fail
 */
@Test
@LargeTest
@RequiresDevice
public void verifyUseVolumeKeysForNavigationStoring() throws InterruptedException {
    onView(withId(R.id.useVolumeKeysForNavigation))
            .perform(click());
    Thread.sleep(1000);
    onView(withId(R.id.useVolumeKeysForNavigation))
            .check(matches(isNotChecked()));

    settingsActivityRule.getActivity().onStop();
    settingsActivityRule.getActivity().finish();
    Thread.sleep(1000);
    assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));

    settingsActivityRule.launchActivity(null);
    onView(withId(R.id.useVolumeKeysForNavigation))
            .check(matches(isNotChecked()))
            .perform(click());
    Thread.sleep(1000);
    onView(withId(R.id.useVolumeKeysForNavigation))
            .check(matches(isChecked()));

    settingsActivityRule.getActivity().onStop();
    settingsActivityRule.getActivity().finish();
    Thread.sleep(1000);
    assertThat(settingsActivityRule.getActivity().isDestroyed(), is(true));

    settingsActivityRule.launchActivity(null);
    onView(withId(R.id.useVolumeKeysForNavigation)).check(matches(isChecked()));
}
 
开发者ID:FelixWohlfrom,项目名称:Presenter-Client-Android,代码行数:38,代码来源:SettingsActivityTest.java

示例5: testLargeTest

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testLargeTest() {
    Log.d("Test Filters", "This is a large test");
    Activity activity = activityTestRule.getActivity();
    assertNotNull("MainActivity is not available", activity);
}
 
开发者ID:ravidsrk,项目名称:android-testing-guide,代码行数:8,代码来源:MainActivityTest.java

示例6: testBasicContent

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testBasicContent() throws Throwable {
  // Verify different combinations of snackbar content (title / subtitle and action)
  // and duration

  // Short duration
  verifySnackbarContent(
      makeCustomSnackbar()
          .setTitle(TITLE_TEXT)
          .setSubtitle(SUBTITLE_TEXT)
          .setDuration(Snackbar.LENGTH_SHORT),
      TITLE_TEXT,
      SUBTITLE_TEXT);

  // Long duration
  verifySnackbarContent(
      makeCustomSnackbar()
          .setTitle(TITLE_TEXT)
          .setSubtitle(SUBTITLE_TEXT)
          .setDuration(Snackbar.LENGTH_LONG),
      TITLE_TEXT,
      SUBTITLE_TEXT);

  // Indefinite duration
  verifySnackbarContent(
      makeCustomSnackbar()
          .setTitle(TITLE_TEXT)
          .setSubtitle(SUBTITLE_TEXT)
          .setDuration(Snackbar.LENGTH_INDEFINITE),
      TITLE_TEXT,
      SUBTITLE_TEXT);
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:34,代码来源:CustomSnackbarTest.java

示例7: testMinMaxTabWidth

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testMinMaxTabWidth() {
  verifyMinMaxTabWidth(
      R.layout.tab_layout_bound_minmax,
      R.dimen.tab_width_limit_small,
      R.dimen.tab_width_limit_large);
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:9,代码来源:TabLayoutWithViewPagerTest.java

示例8: testStopRestartVideoSource

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStopRestartVideoSource() throws InterruptedException {
  fixtures.stopRestartVideoSource();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:6,代码来源:Camera1CapturerUsingTextureTest.java

示例9: testStartStopWithDifferentResolutions

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStartStopWithDifferentResolutions() throws InterruptedException {
  fixtures.startStopWithDifferentResolutions();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:6,代码来源:Camera1CapturerUsingTextureTest.java

示例10: testReturnBufferLate

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testReturnBufferLate() throws InterruptedException {
  fixtures.returnBufferLate();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:6,代码来源:Camera1CapturerUsingTextureTest.java

示例11: testCameraFreezedEventOnBufferStarvation

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testCameraFreezedEventOnBufferStarvation() throws InterruptedException {
  fixtures.cameraFreezedEventOnBufferStarvation();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:6,代码来源:Camera1CapturerUsingTextureTest.java

示例12: testStartWhileCameraIsAlreadyOpen

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStartWhileCameraIsAlreadyOpen() throws InterruptedException {
  fixtures.startWhileCameraIsAlreadyOpen();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:6,代码来源:Camera1CapturerUsingTextureTest.java

示例13: testStartWhileCameraIsAlreadyOpenAndCloseCamera

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testStartWhileCameraIsAlreadyOpenAndCloseCamera() throws InterruptedException {
  fixtures.startWhileCameraIsAlreadyOpenAndCloseCamera();
}
 
开发者ID:lgyjg,项目名称:AndroidRTC,代码行数:6,代码来源:Camera1CapturerUsingTextureTest.java

示例14: testMinTabWidth

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testMinTabWidth() {
  verifyMinMaxTabWidth(R.layout.tab_layout_bound_min, R.dimen.tab_width_limit_medium, 0);
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:6,代码来源:TabLayoutWithViewPagerTest.java

示例15: testMaxTabWidth

import android.support.test.filters.LargeTest; //导入依赖的package包/类
@Test
@LargeTest
public void testMaxTabWidth() {
  verifyMinMaxTabWidth(R.layout.tab_layout_bound_max, 0, R.dimen.tab_width_limit_medium);
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:6,代码来源:TabLayoutWithViewPagerTest.java


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