diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2015-02-11 19:01:48 +0100 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2015-02-11 19:01:48 +0100 |
commit | eac13a5843d2e46d62b1c72aee0916aeb3030b3a (patch) | |
tree | d15253beff8f79e9aea12e44d6e620f70ed9c099 /tests | |
parent | 7ec2b8696f4dac0fc27075bfb0aa5846baa87168 (diff) | |
download | cgeo-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.java | 3 | ||||
-rw-r--r-- | tests/src/cgeo/geocaching/utils/FileUtilsTest.java | 4 |
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); } } |