diff options
author | Julian Kast <julian@livio.com> | 2020-08-26 21:21:14 -0400 |
---|---|---|
committer | Julian Kast <julian@livio.com> | 2020-08-26 21:21:14 -0400 |
commit | 6fa2e178b77fc190ff391c49ebe254243e8c45ae (patch) | |
tree | 71bd4c6e1328ddc7a702a47c612374bd8cc767ac /android/sdl_android/src | |
parent | 10f5e261c3d089829c7b5dbec66874a57be66d88 (diff) | |
download | sdl_android-6fa2e178b77fc190ff391c49ebe254243e8c45ae.tar.gz |
Fixed unit test
Diffstat (limited to 'android/sdl_android/src')
-rw-r--r-- | android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperationTest.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperationTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperationTest.java index a279e3aec..292e828fd 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperationTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperationTest.java @@ -5,6 +5,7 @@ import android.net.Uri; import androidx.test.ext.junit.runners.AndroidJUnit4; +import com.smartdevicelink.R; import com.smartdevicelink.managers.CompletionListener; import com.smartdevicelink.managers.ManagerUtility; import com.smartdevicelink.managers.file.FileManager; @@ -58,6 +59,7 @@ public class TextAndGraphicUpdateOperationTest { private Show currentScreenData; private CompletionListener listener; private TextAndGraphicManager.CurrentScreenDataUpdatedListener currentScreenDataUpdatedListener; + private SdlArtwork blankArtwork; ISdl internalInterface; FileManager fileManager; @@ -130,6 +132,11 @@ public class TextAndGraphicUpdateOperationTest { mediaTrackField = "dudes"; title = "dudes"; + blankArtwork = new SdlArtwork(); + blankArtwork.setType(FileType.GRAPHIC_PNG); + blankArtwork.setName("blankArtwork"); + blankArtwork.setResourceId(R.drawable.transparent); + textField1Type = MetadataType.MEDIA_TITLE; textField2Type = MetadataType.MEDIA_TITLE; textField3Type = MetadataType.MEDIA_TITLE; @@ -276,7 +283,7 @@ public class TextAndGraphicUpdateOperationTest { //Test: If there are no images to update, just send the text TextsAndGraphicsState textsAndGraphicsStateNullImages = new TextsAndGraphicsState(textField1, textField2, textField3, textField4, - mediaTrackField, title, null, null, textAlignment, textField1Type, textField2Type, textField3Type, textField4Type); + mediaTrackField, title, blankArtwork, blankArtwork, textAlignment, textField1Type, textField2Type, textField3Type, textField4Type); textAndGraphicUpdateOperation = new TextAndGraphicUpdateOperation(internalInterface, fileManager, defaultMainWindowCapability, currentScreenData, textsAndGraphicsStateNullImages, listener, currentScreenDataUpdatedListener); textAndGraphicUpdateOperation.onExecute(); assertEquals(textAndGraphicUpdateOperation.getCurrentScreenData().getMainField1(), textField1); |