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

Commit 9327fb63 authored by lyn's avatar lyn
Browse files

Test that bundles are sorted before notifs

Bug: 414718137
Test: this
Flag: TEST_ONLY
Change-Id: I47500298af75cf7115f210f40f624b7a66285a67
parent 04fd3d1f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -346,6 +346,15 @@ public class RankingCoordinatorTest extends SysuiTestCase {
        assertEquals("i=3 expected Recs", recsBundle, bundles.get(3));
    }

    @Test
    public void testSilentSectionComparator_sortsBundlesBeforeNotifs() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getSOCIAL_MEDIA());
        int comparison = mSilentSectioner.getComparator().compare(bundleEntry, mEntry);
        assertTrue("Expected BundleEntry before NotifEntry (comparison < 0) but was: "
                        + comparison,
                comparison < 0);
    }

    @Test
    public void testMinimizedSectioner_rejectsBundle() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());