aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2015-02-11 19:01:48 +0100
committerSamuel Tardieu <sam@rfc1149.net>2015-02-11 19:01:48 +0100
commiteac13a5843d2e46d62b1c72aee0916aeb3030b3a (patch)
treed15253beff8f79e9aea12e44d6e620f70ed9c099 /tests
parent7ec2b8696f4dac0fc27075bfb0aa5846baa87168 (diff)
downloadcgeo-eac13a5843d2e46d62b1c72aee0916aeb3030b3a.zip
cgeo-eac13a5843d2e46d62b1c72aee0916aeb3030b3a.tar.gz
cgeo-eac13a5843d2e46d62b1c72aee0916aeb3030b3a.tar.bz2
Move deleteDirectory to FileUtils
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/StaticMapsProviderTest.java3
-rw-r--r--tests/src/cgeo/geocaching/utils/FileUtilsTest.java4
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/src/cgeo/geocaching/StaticMapsProviderTest.java b/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
index b107912..02b1d02 100644
--- a/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
+++ b/tests/src/cgeo/geocaching/StaticMapsProviderTest.java
@@ -7,6 +7,7 @@ import cgeo.geocaching.files.LocalStorage;
import cgeo.geocaching.location.Geopoint;
import cgeo.geocaching.settings.Settings;
import cgeo.geocaching.settings.TestSettings;
+import cgeo.geocaching.utils.FileUtils;
import cgeo.geocaching.utils.RxUtils;
import junit.framework.TestCase;
@@ -78,7 +79,7 @@ public class StaticMapsProviderTest extends TestCase {
private static void deleteCacheDirectory(String geocode) {
File cacheDir = LocalStorage.getStorageDir(geocode);
- LocalStorage.deleteDirectory(cacheDir);
+ FileUtils.deleteDirectory(cacheDir);
}
}
diff --git a/tests/src/cgeo/geocaching/utils/FileUtilsTest.java b/tests/src/cgeo/geocaching/utils/FileUtilsTest.java
index 17aed70..0d7fab1 100644
--- a/tests/src/cgeo/geocaching/utils/FileUtilsTest.java
+++ b/tests/src/cgeo/geocaching/utils/FileUtilsTest.java
@@ -29,7 +29,7 @@ public class FileUtilsTest extends TestCase {
}
public void testGetUniqueNamedFile() throws IOException {
- LocalStorage.deleteDirectory(cacheDir);
+ FileUtils.deleteDirectory(cacheDir);
cacheDir.mkdirs();
try {
assertThat(FileUtils.getUniqueNamedFile(baseFile)).isEqualTo(baseFile);
@@ -39,7 +39,7 @@ public class FileUtilsTest extends TestCase {
assertThat(FileUtils.getUniqueNamedFile(baseFile)).isEqualTo(alternative2);
assertThat(FileUtils.getUniqueNamedFile(baseFile)).isEqualTo(alternative2);
} finally {
- LocalStorage.deleteDirectory(cacheDir);
+ FileUtils.deleteDirectory(cacheDir);
}
}