diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index eb91b81..8b4ef03 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,7 +18,7 @@
package="com.android.messaging"
android:installLocation="internalOnly">
-
+
diff --git a/tests/AndroidManifest.xml b/tests/AndroidManifest.xml
index 3ad7d8e..867d8e1 100644
--- a/tests/AndroidManifest.xml
+++ b/tests/AndroidManifest.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/tests/src/com/android/messaging/datamodel/ParticipantRefreshTest.java b/tests/src/com/android/messaging/datamodel/ParticipantRefreshTest.java
index d585e10..cd1d6c7 100644
--- a/tests/src/com/android/messaging/datamodel/ParticipantRefreshTest.java
+++ b/tests/src/com/android/messaging/datamodel/ParticipantRefreshTest.java
@@ -30,11 +30,9 @@ import com.android.messaging.FakeFactory;
import com.android.messaging.datamodel.DatabaseHelper.ParticipantColumns;
import com.android.messaging.datamodel.data.ParticipantData;
import com.android.messaging.datamodel.data.ParticipantData.ParticipantsQuery;
-import com.android.messaging.ui.UIIntents;
import com.android.messaging.util.ContactUtil;
import org.junit.Assert;
-import org.mockito.Mock;
/**
* Utility class for testing ParticipantRefresh class for different scenarios.
@@ -43,8 +41,6 @@ import org.mockito.Mock;
public class ParticipantRefreshTest extends BugleTestCase {
private FakeContext mContext;
FakeFactory mFakeFactory;
- @Mock protected UIIntents mMockUIIntents;
- protected FakeDataModel mFakeDataModel;
@Override
public void setUp() throws Exception {
@@ -56,10 +52,9 @@ public class ParticipantRefreshTest extends BugleTestCase {
provider.attachInfo(mContext, null);
mContext.addContentProvider(MessagingContentProvider.AUTHORITY, provider);
- mFakeDataModel = new FakeDataModel(mContext);
+ final FakeDataModel fakeDataModel = new FakeDataModel(mContext);
mFakeFactory = FakeFactory.registerWithFakeContext(getTestContext(), mContext)
- .withDataModel(mFakeDataModel)
- .withUIIntents(mMockUIIntents);
+ .withDataModel(fakeDataModel);
}
/**
@@ -184,7 +179,7 @@ public class ParticipantRefreshTest extends BugleTestCase {
});
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_INCREMENTAL);
- verifyParticipant("650-123-1233", 1, "John", "content://photo/john");
+ verifyParticipant("650-123-1233", 1, "Joh", "content://photo/joh");
}
/**
@@ -211,7 +206,8 @@ public class ParticipantRefreshTest extends BugleTestCase {
});
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_INCREMENTAL);
- verifyParticipant("650-123-1233", 1, "John", "content://photo/john");
+ verifyParticipant("650-123-1233", ParticipantData.PARTICIPANT_CONTACT_ID_NOT_FOUND,
+ null, null);
}
/**
@@ -253,7 +249,7 @@ public class ParticipantRefreshTest extends BugleTestCase {
});
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_FULL);
- verifyParticipant("650-123-1233", 1, "John", "content://photo/john");
+ verifyParticipant("650-123-1233", 2, "Joe", "content://photo/joe");
}
/**
@@ -274,7 +270,7 @@ public class ParticipantRefreshTest extends BugleTestCase {
* Verify that refresh take first contact in case current contact_id no longer matches.
*/
public void testFullRefreshResolvedBeforeButNotFoundNow() {
- addParticipant("650-123-1233", 1, "Joh", "content://photo/joh");
+ addParticipant("650-123-1233", 3, "Joh", "content://photo/joh");
addPhoneLookup("650-123-1233", new Object[][] {});
ParticipantRefresh.refreshParticipants(ParticipantRefresh.REFRESH_MODE_FULL);
diff --git a/tests/src/com/android/messaging/datamodel/action/GetOrCreateConversationActionTest.java b/tests/src/com/android/messaging/datamodel/action/GetOrCreateConversationActionTest.java
index 6e7b40d..b05b022 100644
--- a/tests/src/com/android/messaging/datamodel/action/GetOrCreateConversationActionTest.java
+++ b/tests/src/com/android/messaging/datamodel/action/GetOrCreateConversationActionTest.java
@@ -67,10 +67,8 @@ public class GetOrCreateConversationActionTest extends BugleTestCase {
final long threadId = MmsUtils.getOrCreateThreadId(mContext, recipients);
assertEquals(TestDataFactory.SMS_MMS_THREAD_ID_CURSOR_VALUE, threadId);
- // TestDataFactory creates NUM_TEST_CONVERSATIONS conversations. blank
- // conversation would be the next conversation.
final String blankId = BugleDatabaseOperations.getExistingConversation(db, threadId, false);
- assertEquals(TestDataFactory.NUM_TEST_CONVERSATIONS+1, Integer.parseInt((String)blankId));
+ assertNull("Conversation already exists", blankId);
ArrayList calls = mService.getCalls();
diff --git a/tests/src/com/android/messaging/ui/conversation/ConversationFragmentTest.java b/tests/src/com/android/messaging/ui/conversation/ConversationFragmentTest.java
index aee2d84..c92fbf6 100644
--- a/tests/src/com/android/messaging/ui/conversation/ConversationFragmentTest.java
+++ b/tests/src/com/android/messaging/ui/conversation/ConversationFragmentTest.java
@@ -91,9 +91,6 @@ public class ConversationFragmentTest extends FragmentTestCase