summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/feed/FeedItemTest.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/feed/FeedItemTest.java b/app/src/androidTest/java/de/test/antennapod/feed/FeedItemTest.java
new file mode 100644
index 000000000..c991ccd39
--- /dev/null
+++ b/app/src/androidTest/java/de/test/antennapod/feed/FeedItemTest.java
@@ -0,0 +1,35 @@
+package de.test.antennapod.feed;
+
+import android.test.AndroidTestCase;
+import de.danoeh.antennapod.core.feed.FeedItem;
+
+public class FeedItemTest extends AndroidTestCase {
+
+ public void testShownoteLength() throws Exception {
+ FeedItem item = new FeedItem();
+
+ item.setDescription(null);
+ item.setContentEncoded("Hello world");
+ assertEquals("Hello world", item.loadShownotes().call());
+
+ item.setDescription("");
+ item.setContentEncoded("Hello world");
+ assertEquals("Hello world", item.loadShownotes().call());
+
+ item.setDescription("Hello world");
+ item.setContentEncoded(null);
+ assertEquals("Hello world", item.loadShownotes().call());
+
+ item.setDescription("Hello world");
+ item.setContentEncoded("");
+ assertEquals("Hello world", item.loadShownotes().call());
+
+ item.setDescription("Hi");
+ item.setContentEncoded("Hello world");
+ assertEquals("Hello world", item.loadShownotes().call());
+
+ item.setDescription("Hello world");
+ item.setContentEncoded("Hi");
+ assertEquals("Hello world", item.loadShownotes().call());
+ }
+}