From 11463d410dca3fc4757b9f476f77f8a72be08f17 Mon Sep 17 00:00:00 2001 From: Stuart Gilbert Date: Fri, 27 Jan 2017 08:40:37 -0800 Subject: [PATCH] Fixing broken unit test for ConversationAdapter The unit test for ConversationAdapter.getItemId() was broken by this change: 7286fd9 Fixes #6088 // FREEBIE --- .../thoughtcrime/securesms/ConversationAdapterTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java b/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java index 7bfe595443..88b4fd4379 100644 --- a/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java +++ b/test/unitTest/java/org/thoughtcrime/securesms/ConversationAdapterTest.java @@ -24,14 +24,11 @@ public class ConversationAdapterTest extends BaseUnitTest { } @Test - public void testGetItemIdEquals() throws Exception { - when(cursor.getString(anyInt())).thenReturn("SMS::1::1"); + public void testGetItemIdEquals() { + when(cursor.getLong(anyInt())).thenReturn(1234L); long firstId = adapter.getItemId(cursor); - when(cursor.getString(anyInt())).thenReturn("MMS::1::1"); + when(cursor.getLong(anyInt())).thenReturn(4321L); 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