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

Commit 3aba36cc authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Fixing tests that did not get updated earlier

The change https://android-git.corp.google.com/g/#change,45372
broke the tests.  I have verified that it's the tests
and not the tested code that is broken.

Bug: 2524876
Change-Id: Iaa3d1012bef301d09562793b0adac8888be2c783
parent 6013973b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -367,7 +367,7 @@ public class EntityDeltaTests extends AndroidTestCase {
        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
        source.buildAssert(diff);
        source.buildDiff(diff);
        assertEquals("Unexpected operations", 1, diff.size());
        assertEquals("Unexpected operations", 2, diff.size());
        {
            final ContentProviderOperation oper = diff.get(0);
            assertEquals("Incorrect type", TYPE_INSERT, oper.getType());
@@ -395,7 +395,7 @@ public class EntityDeltaTests extends AndroidTestCase {
        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
        source.buildAssert(diff);
        source.buildDiff(diff);
        assertEquals("Unexpected operations", 2, diff.size());
        assertEquals("Unexpected operations", 3, diff.size());
        {
            final ContentProviderOperation oper = diff.get(0);
            assertEquals("Incorrect type", TYPE_INSERT, oper.getType());
+2 −2
Original line number Diff line number Diff line
@@ -512,7 +512,7 @@ public class EntityModifierTests extends AndroidTestCase {
        // Build diff, expecting single insert
        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
        state.buildDiff(diff);
        assertEquals("Unexpected operations", 1, diff.size());
        assertEquals("Unexpected operations", 2, diff.size());
        {
            final ContentProviderOperation oper = diff.get(0);
            assertEquals("Incorrect type", TYPE_INSERT, oper.getType());
@@ -540,7 +540,7 @@ public class EntityModifierTests extends AndroidTestCase {
        // Build diff, expecting two insert operations
        final ArrayList<ContentProviderOperation> diff = Lists.newArrayList();
        state.buildDiff(diff);
        assertEquals("Unexpected operations", 2, diff.size());
        assertEquals("Unexpected operations", 3, diff.size());
        {
            final ContentProviderOperation oper = diff.get(0);
            assertEquals("Incorrect type", TYPE_INSERT, oper.getType());
+3 −0
Original line number Diff line number Diff line
@@ -486,6 +486,7 @@ public class EntitySetTests extends AndroidTestCase {
                buildAssertVersion(VER_FIRST),
                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, joeContactInsert),
                buildOper(Data.CONTENT_URI, TYPE_INSERT, joePhoneInsert),
                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
                buildUpdateAggregationKeepTogether(CONTACT_BOB));

        // Merge in the second version, verify that our insert remains
@@ -495,6 +496,7 @@ public class EntitySetTests extends AndroidTestCase {
                buildAssertVersion(VER_SECOND),
                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, joeContactInsert),
                buildOper(Data.CONTENT_URI, TYPE_INSERT, joePhoneInsert),
                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
                buildUpdateAggregationKeepTogether(CONTACT_BOB));
    }

@@ -545,6 +547,7 @@ public class EntitySetTests extends AndroidTestCase {
                buildAssertVersion(VER_SECOND),
                buildOper(RawContacts.CONTENT_URI, TYPE_INSERT, contactInsert),
                buildOper(Data.CONTENT_URI, TYPE_INSERT, phoneInsert),
                buildAggregationModeUpdate(RawContacts.AGGREGATION_MODE_DEFAULT),
                buildUpdateAggregationKeepTogether(CONTACT_BOB));
    }