Search in sources :

Example 6 with ChooseLockPatternFragment

use of com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment in project android_packages_apps_Settings by DirtyUnicorns.

the class ChooseLockPatternTest method assertThat_chooseLockIconChanged_WhenFingerprintExtraSet.

@Test
public void assertThat_chooseLockIconChanged_WhenFingerprintExtraSet() {
    ChooseLockPattern activity = createActivity(true);
    ChooseLockPatternFragment fragment = (ChooseLockPatternFragment) activity.getFragmentManager().findFragmentById(R.id.main_content);
    ShadowDrawable drawable = Shadows.shadowOf(((GlifLayout) fragment.getView()).getIcon());
    assertThat(drawable.getCreatedFromResId()).isEqualTo(R.drawable.ic_fingerprint_header);
}
Also used : ChooseLockPatternFragment(com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment) ShadowDrawable(org.robolectric.shadows.ShadowDrawable) Test(org.junit.Test)

Example 7 with ChooseLockPatternFragment

use of com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment in project android_packages_apps_Settings by SudaMod.

the class ChooseLockPatternTest method assertThat_chooseLockIconChanged_WhenFingerprintExtraSet.

@Test
public void assertThat_chooseLockIconChanged_WhenFingerprintExtraSet() {
    ChooseLockPattern activity = createActivity(true);
    ChooseLockPatternFragment fragment = (ChooseLockPatternFragment) activity.getFragmentManager().findFragmentById(R.id.main_content);
    ShadowDrawable drawable = Shadows.shadowOf(((GlifLayout) fragment.getView()).getIcon());
    assertThat(drawable.getCreatedFromResId()).isEqualTo(R.drawable.ic_fingerprint_header);
}
Also used : ChooseLockPatternFragment(com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment) ShadowDrawable(org.robolectric.shadows.ShadowDrawable) Test(org.junit.Test)

Example 8 with ChooseLockPatternFragment

use of com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment in project platform_packages_apps_Settings by BlissRoms.

the class ChooseLockPatternTest method assertThat_chooseLockIconChanged_WhenFingerprintExtraSet.

@Test
public void assertThat_chooseLockIconChanged_WhenFingerprintExtraSet() {
    ChooseLockPattern activity = createActivity(true);
    ChooseLockPatternFragment fragment = (ChooseLockPatternFragment) activity.getFragmentManager().findFragmentById(R.id.main_content);
    ShadowDrawable drawable = Shadows.shadowOf(((GlifLayout) fragment.getView()).getIcon());
    assertThat(drawable.getCreatedFromResId()).isEqualTo(R.drawable.ic_fingerprint_header);
}
Also used : ChooseLockPatternFragment(com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment) ShadowDrawable(org.robolectric.shadows.ShadowDrawable) Test(org.junit.Test)

Example 9 with ChooseLockPatternFragment

use of com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ChooseLockPatternTest method fingerprintExtraSet_shouldDisplayFingerprintIcon.

@Config(qualifiers = "sw400dp")
@Test
public void fingerprintExtraSet_shouldDisplayFingerprintIcon() {
    ChooseLockPattern activity = createActivity(true);
    ChooseLockPatternFragment fragment = (ChooseLockPatternFragment) activity.getSupportFragmentManager().findFragmentById(R.id.main_content);
    DrawableTestHelper.assertDrawableResId(((GlifLayout) fragment.getView()).getIcon(), R.drawable.ic_fingerprint_header);
}
Also used : ChooseLockPatternFragment(com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment) Test(org.junit.Test) Config(org.robolectric.annotation.Config)

Aggregations

ChooseLockPatternFragment (com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment)9 Test (org.junit.Test)9 ShadowDrawable (org.robolectric.shadows.ShadowDrawable)6 Config (org.robolectric.annotation.Config)2 View (android.view.View)1 Button (android.widget.Button)1 PartnerCustomizationLayout (com.google.android.setupcompat.PartnerCustomizationLayout)1 FooterBarMixin (com.google.android.setupcompat.template.FooterBarMixin)1