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

Commit 22bad556 authored by Andreas Gampe's avatar Andreas Gampe
Browse files

Settings: Fix assertThat in tests

Truth.assertThat is a fluent-style API. Fix the tests to actually
do something.

Found by errorprone.

Bug: 73513670
Test: m RunSettingsRoboTests
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ib923de28ce5dcf79b9dec718306877e31e58e024
parent c98d67a0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -452,8 +452,8 @@ public class PowerUsageSummaryLegacyTest {
        TextView summary1 = mFragment.mBatteryLayoutPref.findViewById(R.id.summary1);
        TextView summary2 = mFragment.mBatteryLayoutPref.findViewById(R.id.summary2);
        Robolectric.flushBackgroundThreadScheduler();
        assertThat(summary2.getText().toString().contains(NEW_ML_EST_SUFFIX));
        assertThat(summary1.getText().toString().contains(OLD_EST_SUFFIX));
        assertThat(summary2.getText().toString()).contains(NEW_ML_EST_SUFFIX);
        assertThat(summary1.getText().toString()).contains(OLD_EST_SUFFIX);
    }

    @Test
+2 −2
Original line number Diff line number Diff line
@@ -260,8 +260,8 @@ public class PowerUsageSummaryTest {
        TextView summary1 = mFragment.mBatteryLayoutPref.findViewById(R.id.summary1);
        TextView summary2 = mFragment.mBatteryLayoutPref.findViewById(R.id.summary2);
        Robolectric.flushBackgroundThreadScheduler();
        assertThat(summary2.getText().toString().contains(NEW_ML_EST_SUFFIX));
        assertThat(summary1.getText().toString().contains(OLD_EST_SUFFIX));
        assertThat(summary2.getText().toString()).contains(NEW_ML_EST_SUFFIX);
        assertThat(summary1.getText().toString()).contains(OLD_EST_SUFFIX);
    }

    @Test