diff options
author | ByteHamster <info@bytehamster.com> | 2018-03-23 16:01:48 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2018-03-23 16:01:48 +0100 |
commit | fdc5b43ab70f226f9463a84f79ae260af08cb376 (patch) | |
tree | 39cf15899498ad6e73dfa445daf531a1dd146931 /app | |
parent | 97b5779c4acd6ee839d1ba78b1a305461b97b9fc (diff) | |
download | AntennaPod-fdc5b43ab70f226f9463a84f79ae260af08cb376.zip |
Added unit test for shownotes
Diffstat (limited to 'app')
-rw-r--r-- | app/src/androidTest/java/de/test/antennapod/feed/FeedItemTest.java | 35 |
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()); + } +} |