Skip to content

Commit 95da6a2

Browse files
author
Julian Kast
committed
Fixed unit test
1 parent 04ead8f commit 95da6a2

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/TextAndGraphicUpdateOperationTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.smartdevicelink.proxy.interfaces.ISdl;
1717
import com.smartdevicelink.proxy.rpc.ImageField;
1818
import com.smartdevicelink.proxy.rpc.MetadataTags;
19+
import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
1920
import com.smartdevicelink.proxy.rpc.Show;
2021
import com.smartdevicelink.proxy.rpc.ShowResponse;
2122
import com.smartdevicelink.proxy.rpc.TextField;
@@ -261,6 +262,7 @@ private WindowCapability getNullVarWindowCapability() {
261262
public void testUploads() {
262263
doAnswer(onShowSuccess).when(internalInterface).sendRPC(any(Show.class));
263264
doAnswer(onArtworkUploadSuccess).when(fileManager).uploadArtworks(any(List.class), any(MultipleFileCompletionListener.class));
265+
when(internalInterface.getSdlMsgVersion()).thenReturn(new SdlMsgVersion(4, 0));
264266

265267
// Test Images need to be uploaded, sending text and uploading images
266268
textAndGraphicUpdateOperation.onExecute();
@@ -303,6 +305,7 @@ public void testCanceledRightAway() {
303305
public void testTaskCanceledAfterImageUpload() {
304306
doAnswer(onShowSuccess).when(internalInterface).sendRPC(any(Show.class));
305307
doAnswer(onImageUploadSuccessTaskCanceled).when(fileManager).uploadArtworks(any(List.class), any(MultipleFileCompletionListener.class));
308+
when(internalInterface.getSdlMsgVersion()).thenReturn(new SdlMsgVersion(5, 0));
306309

307310
// Test Canceled after Image upload
308311
textAndGraphicUpdateOperation.onExecute();
@@ -314,6 +317,8 @@ public void testTaskCanceledAfterImageUpload() {
314317
@Test
315318
public void testTaskCanceledAfterTextSent() {
316319
doAnswer(onShowSuccessCanceled).when(internalInterface).sendRPC(any(Show.class));
320+
when(internalInterface.getSdlMsgVersion()).thenReturn(new SdlMsgVersion(5, 0));
321+
317322
textAndGraphicUpdateOperation.onExecute();
318323
verify(fileManager, times(0)).uploadArtworks(any(List.class), any(MultipleFileCompletionListener.class));
319324

0 commit comments

Comments
 (0)