From 1d3f1cc79e82c70b18334d656fa759f2274c1d10 Mon Sep 17 00:00:00 2001 From: Siloportem Date: Sun, 26 Feb 2017 17:20:11 +0100 Subject: [PATCH] Revert "Fixing broken unit test for ConversationAdapter" Fixes #6250 Commit 7286fd9 that broke this unit test was reverted so the change to this unit test has also to be reverted since the unit test currently fails. Closes #6308 This reverts commit 11463d410dca3fc4757b9f476f77f8a72be08f17. --- .../thoughtcrime/securesms/ConversationAdapterTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java b/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java index 88b4fd4379..7bfe595443 100644 --- a/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java +++ b/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java @@ -24,11 +24,14 @@ public class ConversationAdapterTest extends BaseUnitTest { } @Test - public void testGetItemIdEquals() { - when(cursor.getLong(anyInt())).thenReturn(1234L); + public void testGetItemIdEquals() throws Exception { + when(cursor.getString(anyInt())).thenReturn("SMS::1::1"); long firstId = adapter.getItemId(cursor); - when(cursor.getLong(anyInt())).thenReturn(4321L); + when(cursor.getString(anyInt())).thenReturn("MMS::1::1"); long secondId = adapter.getItemId(cursor); assertNotEquals(firstId, secondId); + when(cursor.getString(anyInt())).thenReturn("MMS::2::1"); + long thirdId = adapter.getItemId(cursor); + assertNotEquals(secondId, thirdId); } } \ No newline at end of file