Search in sources :

Example 1 with ShadowDrawable

use of org.robolectric.shadows.ShadowDrawable in project android_packages_apps_Settings by LineageOS.

the class ChooseLockPasswordTest method assertThat_chooseLockIconNotChanged_WhenFingerprintExtraSet.

@Test
public void assertThat_chooseLockIconNotChanged_WhenFingerprintExtraSet() {
    ShadowDrawable drawable = setActivityAndGetIconDrawable(false);
    assertThat(drawable.getCreatedFromResId()).isNotEqualTo(R.drawable.ic_fingerprint_header);
}
Also used : ShadowDrawable(org.robolectric.shadows.ShadowDrawable) Test(org.junit.Test)

Example 2 with ShadowDrawable

use of org.robolectric.shadows.ShadowDrawable in project android_packages_apps_Settings by omnirom.

the class ChooseLockPasswordTest method assertThat_chooseLockIconNotChanged_WhenFingerprintExtraSet.

@Test
public void assertThat_chooseLockIconNotChanged_WhenFingerprintExtraSet() {
    ShadowDrawable drawable = setActivityAndGetIconDrawable(false);
    assertThat(drawable.getCreatedFromResId()).isNotEqualTo(R.drawable.ic_fingerprint_header);
}
Also used : ShadowDrawable(org.robolectric.shadows.ShadowDrawable) Test(org.junit.Test)

Example 3 with ShadowDrawable

use of org.robolectric.shadows.ShadowDrawable in project android_packages_apps_Settings by omnirom.

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 4 with ShadowDrawable

use of org.robolectric.shadows.ShadowDrawable in project android_packages_apps_Settings by crdroidandroid.

the class ChooseLockPasswordTest method assertThat_chooseLockIconChanged_WhenFingerprintExtraSet.

@Test
public void assertThat_chooseLockIconChanged_WhenFingerprintExtraSet() {
    ShadowDrawable drawable = setActivityAndGetIconDrawable(true);
    assertThat(drawable.getCreatedFromResId()).isEqualTo(R.drawable.ic_fingerprint_header);
}
Also used : ShadowDrawable(org.robolectric.shadows.ShadowDrawable) Test(org.junit.Test)

Example 5 with ShadowDrawable

use of org.robolectric.shadows.ShadowDrawable in project android_packages_apps_Settings by crdroidandroid.

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)

Aggregations

Test (org.junit.Test)20 ShadowDrawable (org.robolectric.shadows.ShadowDrawable)20 ChooseLockPatternFragment (com.android.settings.password.ChooseLockPattern.ChooseLockPatternFragment)6