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

Commit 72eb284a 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: Ie0ab35348fa56c73e6257477a50ff130450e74e7
parent 8378efc6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -97,8 +97,8 @@ public class PictureInPictureSettingsTest {
        mProfileUserPackages.add(profileP2);

        ArrayList<Pair<ApplicationInfo, Integer>> apps = mFragment.collectPipApps(PRIMARY_USER_ID);
        assertThat(containsPackages(apps, primaryP1, profileP2));
        assertThat(!containsPackages(apps, primaryP2, profileP1));
        assertThat(containsPackages(apps, primaryP1, profileP2)).isTrue();
        assertThat(containsPackages(apps, primaryP2, profileP1)).isFalse();
    }

    @Test
@@ -119,7 +119,7 @@ public class PictureInPictureSettingsTest {

        ArrayList<Pair<ApplicationInfo, Integer>> apps = mFragment.collectPipApps(PRIMARY_USER_ID);
        Collections.sort(apps, new PictureInPictureSettings.AppComparator(null));
        assertThat(isOrdered(apps, primaryP1, profileP1, primaryP2, profileP2));
        assertThat(isOrdered(apps, primaryP1, profileP1, primaryP2, profileP2)).isTrue();
    }

    private boolean containsPackages(ArrayList<Pair<ApplicationInfo, Integer>> apps,