diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2024-04-03 22:21:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 22:21:42 +0200 |
commit | 613a9896e91200c3d4e8744173e48c445003469f (patch) | |
tree | 55f6b53eec9cfaa9ef573d390afa0e27d0360730 /storage/database/src/test/java/de | |
parent | a846e417b030e1491c472d50651d58a8f2c15c0e (diff) | |
download | AntennaPod-613a9896e91200c3d4e8744173e48c445003469f.zip |
Remember column indices between different list items (#7051)
This is way faster than searching for the column index again for every item.
Diffstat (limited to 'storage/database/src/test/java/de')
-rw-r--r-- | storage/database/src/test/java/de/danoeh/antennapod/storage/database/mapper/FeedCursorMapperTest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/storage/database/src/test/java/de/danoeh/antennapod/storage/database/mapper/FeedCursorMapperTest.java b/storage/database/src/test/java/de/danoeh/antennapod/storage/database/mapper/FeedCursorMapperTest.java index 5e7a4843e..2e1697c9f 100644 --- a/storage/database/src/test/java/de/danoeh/antennapod/storage/database/mapper/FeedCursorMapperTest.java +++ b/storage/database/src/test/java/de/danoeh/antennapod/storage/database/mapper/FeedCursorMapperTest.java @@ -2,7 +2,6 @@ package de.danoeh.antennapod.storage.database.mapper; import android.content.ContentValues; import android.content.Context; -import android.database.Cursor; import androidx.test.platform.app.InstrumentationRegistry; @@ -40,9 +39,9 @@ public class FeedCursorMapperTest { @SuppressWarnings("ConstantConditions") @Test public void testFromCursor() { - try (Cursor cursor = adapter.getAllFeedsCursor()) { + try (FeedCursor cursor = new FeedCursor(adapter.getAllFeedsCursor())) { cursor.moveToNext(); - Feed feed = FeedCursorMapper.convert(cursor); + Feed feed = cursor.getFeed(); assertTrue(feed.getId() >= 0); assertEquals("feed custom title", feed.getTitle()); assertEquals("feed custom title", feed.getCustomTitle()); |