Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5696a91 authored by Andrew Sapperstein's avatar Andrew Sapperstein Committed by Android (Google) Code Review
Browse files

Merge "Fix robotests." into oc-dr1-dev

parents 5b67e453 d2cf55bc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import com.android.settings.testutils.FakeFeatureFactory;
import com.android.settings.testutils.shadow.SettingsShadowResources;
import com.android.settingslib.deviceinfo.StorageVolumeProvider;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -70,6 +71,8 @@ public class StorageSummaryDonutPreferenceControllerTest {

    @Before
    public void setUp() throws Exception {
        SettingsShadowResources.overrideResource(
                com.android.internal.R.string.config_headlineFontFamily, "");
        mContext = spy(RuntimeEnvironment.application.getApplicationContext());
        FakeFeatureFactory.setupForTest(mContext);
        mFakeFeatureFactory = (FakeFeatureFactory) FakeFeatureFactory.getFactory(mContext);
@@ -84,6 +87,11 @@ public class StorageSummaryDonutPreferenceControllerTest {
        mHolder = PreferenceViewHolder.createInstanceForTests(view);
    }

    @After
    public void tearDown() {
        SettingsShadowResources.reset();
    }

    @Test
    public void testEmpty() throws Exception {
        mController.updateBytes(0, 32 * GIGABYTE);
+13 −0
Original line number Diff line number Diff line
@@ -38,6 +38,8 @@ import com.android.settings.testutils.shadow.ShadowDynamicIndexableContentMonito
import com.android.settings.testutils.shadow.ShadowEventLogWriter;
import com.android.settings.testutils.shadow.ShadowUtils;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
@@ -66,6 +68,17 @@ import java.util.List;
        })
public class SetupChooseLockPasswordTest {

    @Before
    public void setUp() throws Exception {
        SettingsShadowResources.overrideResource(
                com.android.internal.R.string.config_headlineFontFamily, "");
    }

    @After
    public void tearDown() {
        SettingsShadowResources.reset();
    }

    @Test
    public void createActivity_shouldNotCrash() {
        // Basic sanity test for activity created without crashing