summaryrefslogtreecommitdiff
path: root/app/src/androidTest
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/androidTest')
-rw-r--r--app/src/androidTest/java/de/test/antennapod/service/download/HttpDownloaderTest.java10
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java2
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java6
-rw-r--r--app/src/androidTest/java/de/test/antennapod/ui/UITestUtilsTest.java8
-rw-r--r--app/src/androidTest/java/de/test/antennapod/util/syndication/feedgenerator/Rss2Generator.java4
5 files changed, 15 insertions, 15 deletions
diff --git a/app/src/androidTest/java/de/test/antennapod/service/download/HttpDownloaderTest.java b/app/src/androidTest/java/de/test/antennapod/service/download/HttpDownloaderTest.java
index 46800dd50..dcd27d3b4 100644
--- a/app/src/androidTest/java/de/test/antennapod/service/download/HttpDownloaderTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/service/download/HttpDownloaderTest.java
@@ -67,7 +67,7 @@ public class HttpDownloaderTest {
if (deleteExisting) {
Log.d(TAG, "Deleting file: " + file.delete());
}
- feedfile.setFile_url(fileUrl);
+ feedfile.setLocalFileUrl(fileUrl);
return feedfile;
}
@@ -78,7 +78,7 @@ public class HttpDownloaderTest {
private Downloader download(String url, String title, boolean expectedResult, boolean deleteExisting,
String username, String password) {
Feed feedFile = setupFeedFile(url, title, deleteExisting);
- DownloadRequest request = new DownloadRequest(feedFile.getFile_url(), url, title, 0, Feed.FEEDFILETYPE_FEED,
+ DownloadRequest request = new DownloadRequest(feedFile.getLocalFileUrl(), url, title, 0, Feed.FEEDFILETYPE_FEED,
username, password, null, false);
Downloader downloader = new HttpDownloader(request);
downloader.call();
@@ -86,7 +86,7 @@ public class HttpDownloaderTest {
assertNotNull(status);
assertEquals(expectedResult, status.isSuccessful());
// the file should not exist if the download has failed and deleteExisting was true
- assertTrue(!deleteExisting || new File(feedFile.getFile_url()).exists() == expectedResult);
+ assertTrue(!deleteExisting || new File(feedFile.getLocalFileUrl()).exists() == expectedResult);
return downloader;
}
@@ -114,8 +114,8 @@ public class HttpDownloaderTest {
public void testCancel() {
final String url = httpServer.getBaseUrl() + "/delay/3";
Feed feedFile = setupFeedFile(url, "delay", true);
- final Downloader downloader = new HttpDownloader(new DownloadRequest(feedFile.getFile_url(), url, "delay", 0,
- Feed.FEEDFILETYPE_FEED, null, null, null, false));
+ final Downloader downloader = new HttpDownloader(new DownloadRequest(feedFile.getLocalFileUrl(),
+ url, "delay", 0, Feed.FEEDFILETYPE_FEED, null, null, null, false));
Thread t = new Thread() {
@Override
public void run() {
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java b/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java
index a55670ed6..d0ce7d08f 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/MainActivityTest.java
@@ -63,7 +63,7 @@ public class MainActivityTest {
openNavDrawer();
onView(withText(R.string.add_feed_label)).perform(click());
onView(withId(R.id.addViaUrlButton)).perform(scrollTo(), click());
- onView(withId(R.id.urlEditText)).perform(replaceText(feed.getDownload_url()));
+ onView(withId(R.id.urlEditText)).perform(replaceText(feed.getDownloadUrl()));
onView(withText(R.string.confirm_label)).perform(scrollTo(), click());
// subscribe podcast
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java
index c03480fc6..0202d9d48 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtils.java
@@ -138,7 +138,7 @@ public class UITestUtils {
}
}
feed.setItems(items);
- feed.setDownload_url(hostFeed(feed));
+ feed.setDownloadUrl(hostFeed(feed));
hostedFeeds.add(feed);
}
feedDataHosted = true;
@@ -174,8 +174,8 @@ public class UITestUtils {
for (FeedItem item : feed.getItems()) {
if (item.hasMedia()) {
FeedMedia media = item.getMedia();
- int fileId = Integer.parseInt(StringUtils.substringAfter(media.getDownload_url(), "files/"));
- media.setFile_url(server.accessFile(fileId).getAbsolutePath());
+ int fileId = Integer.parseInt(StringUtils.substringAfter(media.getDownloadUrl(), "files/"));
+ media.setLocalFileUrl(server.accessFile(fileId).getAbsolutePath());
media.setDownloaded(true);
}
}
diff --git a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtilsTest.java b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtilsTest.java
index 36f0cf2a5..377904e30 100644
--- a/app/src/androidTest/java/de/test/antennapod/ui/UITestUtilsTest.java
+++ b/app/src/androidTest/java/de/test/antennapod/ui/UITestUtilsTest.java
@@ -45,10 +45,10 @@ public class UITestUtilsTest {
assertFalse(feeds.isEmpty());
for (Feed feed : feeds) {
- testUrlReachable(feed.getDownload_url());
+ testUrlReachable(feed.getDownloadUrl());
for (FeedItem item : feed.getItems()) {
if (item.hasMedia()) {
- testUrlReachable(item.getMedia().getDownload_url());
+ testUrlReachable(item.getMedia().getDownloadUrl());
}
}
}
@@ -77,8 +77,8 @@ public class UITestUtilsTest {
assertTrue(item.getMedia().getId() != 0);
if (downloadEpisodes) {
assertTrue(item.getMedia().isDownloaded());
- assertNotNull(item.getMedia().getFile_url());
- File file = new File(item.getMedia().getFile_url());
+ assertNotNull(item.getMedia().getLocalFileUrl());
+ File file = new File(item.getMedia().getLocalFileUrl());
assertTrue(file.exists());
}
}
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 ec4a58e33..d3d062301 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
@@ -110,9 +110,9 @@ public class Rss2Generator implements FeedGenerator {
}
if (item.getMedia() != null) {
xml.startTag(null, "enclosure");
- xml.attribute(null, "url", item.getMedia().getDownload_url());
+ xml.attribute(null, "url", item.getMedia().getDownloadUrl());
xml.attribute(null, "length", String.valueOf(item.getMedia().getSize()));
- xml.attribute(null, "type", item.getMedia().getMime_type());
+ xml.attribute(null, "type", item.getMedia().getMimeType());
xml.endTag(null, "enclosure");
}
if (fundingList != null) {