summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorJulian Kast <julian@livio.com>2020-03-20 16:53:05 -0400
committerJulian Kast <julian@livio.com>2020-03-20 16:53:05 -0400
commitd23deada8e8b224a20b69b990d6d521f7a09a3a9 (patch)
tree014251457bcd5243ec1afd2295bb20265e2f7bac /android
parentbd7112bc97bbc95bd92dc0b8e529f721c89d7b8c (diff)
downloadsdl_android-d23deada8e8b224a20b69b990d6d521f7a09a3a9.tar.gz
Fixed unit test
Diffstat (limited to 'android')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicManagerTests.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicManagerTests.java
index 3597c33f5..b685227cb 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicManagerTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicManagerTests.java
@@ -90,6 +90,16 @@ public class TextAndGraphicManagerTests extends AndroidTestCase2 {
return windowCapability;
}
+ /**
+ * Used to simulate WindowCapability having no capabilities set
+ * @return windowCapability that has no capabilities set
+ */
+ private WindowCapability getNullVarWindowCapability() {
+
+ WindowCapability windowCapability = new WindowCapability();
+ return windowCapability;
+ }
+
public void testInstantiation(){
assertNull(textAndGraphicManager.getTextField1());
@@ -117,9 +127,13 @@ public class TextAndGraphicManagerTests extends AndroidTestCase2 {
assertNotNull(textAndGraphicManager.getBlankArtwork());
}
+ /**
+ * Test getting number of lines available to be set based off of windowCapability
+ */
public void testGetMainLines(){
// We want to test that the looping works. By default, it will return 4 if display cap is null
+ textAndGraphicManager.defaultMainWindowCapability = getNullVarWindowCapability();
// Null test
assertEquals(textAndGraphicManager.getNumberOfLines(), 4);