diff options
author | ByteHamster <info@bytehamster.com> | 2019-11-06 17:17:20 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-11-06 17:18:08 +0100 |
commit | d953692443c8e5ae03027210f8a7dcb306e4730d (patch) | |
tree | e373ca4568a58fb7ab6dd6b1c92f1c28c76329fd /core/src/androidTest/java/de | |
parent | 9df14af284bbaf719c21657c66a75478a874194e (diff) | |
download | AntennaPod-d953692443c8e5ae03027210f8a7dcb306e4730d.zip |
Removed commons text library that was just used 2 times
Diffstat (limited to 'core/src/androidTest/java/de')
-rw-r--r-- | core/src/androidTest/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomTextTest.java | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/core/src/androidTest/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomTextTest.java b/core/src/androidTest/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomTextTest.java new file mode 100644 index 000000000..1ab194133 --- /dev/null +++ b/core/src/androidTest/java/de/danoeh/antennapod/core/syndication/namespace/atom/AtomTextTest.java @@ -0,0 +1,49 @@ +package de.danoeh.antennapod.core.syndication.namespace.atom; + +import androidx.test.filters.SmallTest; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; + +import java.util.Arrays; +import java.util.Collection; + +import static org.junit.runners.Parameterized.Parameter; +import static org.junit.runners.Parameterized.Parameters; +import static org.junit.Assert.assertEquals; + +/** + * Unit test for {@link AtomText}. + */ +@SmallTest +@RunWith(Parameterized.class) +public class AtomTextTest { + + @Parameter(value = 0) + public String input; + + @Parameter(value = 1) + public String expectedOutput; + + @Parameters + public static Collection<Object[]> initParameters() { + return Arrays.asList(new Object[][] { + {">", ">"}, + {">", ">"}, + {"<Français>", "<Français>"}, + {"ßÄÖÜ", "ßÄÖÜ"}, + {""", "\""}, + {"ß", "ß"}, + {"’", "’"}, + {"‰", "‰"}, + {"€", "€"}, + }); + } + + @Test + public void testProcessingHtml() { + final AtomText atomText = new AtomText("", new NSAtom(), AtomText.TYPE_HTML); + atomText.setContent(input); + assertEquals(expectedOutput, atomText.getProcessedContent()); + } +} |