summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java/de/test/antennapod/util
diff options
context:
space:
mode:
authorByteHamster <info@bytehamster.com>2020-06-19 16:52:16 +0200
committerByteHamster <info@bytehamster.com>2020-06-19 16:54:16 +0200
commit7612f3c5edc127e36392cae99119d776b481efb3 (patch)
tree9e412e1f80d1d266c5d1661334394d5e6e33e93d /app/src/androidTest/java/de/test/antennapod/util
parent65ec9e5f458e1d3c9003f79c21abb217a81d1910 (diff)
downloadAntennaPod-7612f3c5edc127e36392cae99119d776b481efb3.zip
Added test for whitespaces in feed attributes
Diffstat (limited to 'app/src/androidTest/java/de/test/antennapod/util')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java8
-rw-r--r--app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java8
2 files changed, 14 insertions, 2 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java
index 8d2408b45..c80e3bbb1 100644
--- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java
+++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/AtomGenerator.java
@@ -15,7 +15,7 @@ import de.danoeh.antennapod.core.util.DateUtils;
/**
* Creates Atom feeds. See FeedGenerator for more information.
*/
-public class AtomGenerator implements FeedGenerator{
+public class AtomGenerator implements FeedGenerator {
private static final String NS_ATOM = "http://www.w3.org/2005/Atom";
@@ -119,7 +119,13 @@ public class AtomGenerator implements FeedGenerator{
}
}
+ writeAdditionalAttributes(xml);
+
xml.endTag(null, "feed");
xml.endDocument();
}
+
+ protected void writeAdditionalAttributes(XmlSerializer xml) throws IOException {
+
+ }
}
diff --git a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java
index 5f8b4d18c..ee664bfdc 100644
--- a/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java
+++ b/app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/RSS2Generator.java
@@ -14,7 +14,7 @@ import de.danoeh.antennapod.core.util.DateUtils;
/**
* Creates RSS 2.0 feeds. See FeedGenerator for more information.
*/
-public class RSS2Generator implements FeedGenerator{
+public class RSS2Generator implements FeedGenerator {
public static final long FEATURE_WRITE_GUID = 1;
@@ -111,9 +111,15 @@ public class RSS2Generator implements FeedGenerator{
}
}
+ writeAdditionalAttributes(xml);
+
xml.endTag(null, "channel");
xml.endTag(null, "rss");
xml.endDocument();
}
+
+ protected void writeAdditionalAttributes(XmlSerializer xml) throws IOException {
+
+ }
}