This repository has been archived by the owner on Feb 19, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if external storage dir already exists to fix #128
- Check if external storage dir already exists when trying to create it - Get rid of erroneous warning message in said case - Remove autoboxing of boolean value - Add test case to verify external storage dir creation works
- Loading branch information
1 parent
89de496
commit 485d976
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
hockeysdk/src/androidTest/java/net/hockeyapp/android/EnvironmentTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package net.hockeyapp.android; | ||
|
||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import junit.framework.TestCase; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* <h3>Description</h3> | ||
* | ||
* This class provides testing for the environment features, such as the SDK wide constants. | ||
*/ | ||
@RunWith(AndroidJUnit4.class) | ||
public class EnvironmentTest extends TestCase { | ||
|
||
/** | ||
* Test to verify basic creation of the external storage directory works. | ||
*/ | ||
@Test | ||
public void basicStorageDirTest() { | ||
File storageDir = Constants.getHockeyAppStorageDir(); | ||
|
||
assertNotNull(storageDir); | ||
assertTrue(storageDir.exists()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters