summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2020-08-17 13:48:54 -0400
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2020-08-17 13:48:54 -0400
commitf0418a8b50dd590e0eaa4dc89a1f1366dcf600eb (patch)
treeb37d7b3523c61f9a231e7ba5141b0a97aec6ca4a /android
parentf24ea7e108cce7e6ee89dd5eccd4225b918faa2b (diff)
downloadsdl_android-f0418a8b50dd590e0eaa4dc89a1f1366dcf600eb.tar.gz
Test Overwrite in SdlFile
Diffstat (limited to 'android')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java
index 86f328e8a..99d34fdff 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java
@@ -40,6 +40,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertFalse;
@RunWith(AndroidJUnit4.class)
public class SdlFileTests {
@@ -60,6 +61,7 @@ public class SdlFileTests {
assertEquals(sdlFile.getType(), TestValues.GENERAL_FILETYPE);
sdlFile.setPersistent(TestValues.GENERAL_BOOLEAN);
assertEquals(sdlFile.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile.getOverwrite());
// Case 2 (Setting resourceId)
sdlFile = new SdlFile();
@@ -73,6 +75,7 @@ public class SdlFileTests {
assertEquals(sdlFile.getType(), TestValues.GENERAL_FILETYPE);
sdlFile.setPersistent(TestValues.GENERAL_BOOLEAN);
assertEquals(sdlFile.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile.getOverwrite());
// Case 3 (Setting URI)
sdlFile = new SdlFile();
@@ -86,6 +89,7 @@ public class SdlFileTests {
assertEquals(sdlFile.getType(), TestValues.GENERAL_FILETYPE);
sdlFile.setPersistent(TestValues.GENERAL_BOOLEAN);
assertEquals(sdlFile.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile.getOverwrite());
}
@Test
@@ -96,6 +100,7 @@ public class SdlFileTests {
assertEquals(sdlFile1.getType(), TestValues.GENERAL_FILETYPE);
assertEquals((Integer) sdlFile1.getResourceId(), TestValues.GENERAL_INTEGER);
assertEquals(sdlFile1.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile1.getOverwrite());
// Case2 (Let the library generate a name)
SdlFile sdlFile2 = new SdlFile(null, TestValues.GENERAL_FILETYPE, TestValues.GENERAL_INTEGER, TestValues.GENERAL_BOOLEAN);
@@ -105,6 +110,7 @@ public class SdlFileTests {
assertEquals(sdlFile2.getType(), TestValues.GENERAL_FILETYPE);
assertEquals((Integer) sdlFile2.getResourceId(), TestValues.GENERAL_INTEGER);
assertEquals(sdlFile2.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile2.getOverwrite());
}
@Test
@@ -115,6 +121,7 @@ public class SdlFileTests {
assertEquals(sdlFile1.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile1.getFileData(), TestValues.GENERAL_BYTE_ARRAY);
assertEquals(sdlFile1.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile1.getOverwrite());
// Case2 (Let the library generate a name)
SdlFile sdlFile2 = new SdlFile(null, TestValues.GENERAL_FILETYPE, TestValues.GENERAL_BYTE_ARRAY, TestValues.GENERAL_BOOLEAN);
@@ -124,6 +131,7 @@ public class SdlFileTests {
assertEquals(sdlFile2.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile2.getFileData(), TestValues.GENERAL_BYTE_ARRAY);
assertEquals(sdlFile2.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile2.getOverwrite());
}
@Test
@@ -134,6 +142,7 @@ public class SdlFileTests {
assertEquals(sdlFile1.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile1.getUri(), TestValues.GENERAL_URI);
assertEquals(sdlFile1.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile1.getOverwrite());
// Case2 (Let the library generate a name)
SdlFile sdlFile2 = new SdlFile(null, TestValues.GENERAL_FILETYPE, TestValues.GENERAL_URI, TestValues.GENERAL_BOOLEAN);
@@ -143,5 +152,6 @@ public class SdlFileTests {
assertEquals(sdlFile2.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile2.getUri(), TestValues.GENERAL_URI);
assertEquals(sdlFile2.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile2.getOverwrite());
}
}