當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。