Skip to content

Commit 0d147c9

Browse files
Merge branch 'develop' into bugfix/issue_1331
# Conflicts: # android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java
2 parents d5d803c + 40cbb4a commit 0d147c9

23 files changed

Lines changed: 789 additions & 78 deletions

File tree

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,4 +925,60 @@ public void onComplete(Map<String, String> errors) {
925925
});
926926
verify(internalInterface, times(1)).sendRequests(any(List.class), any(OnMultipleRequestListener.class));
927927
}
928+
929+
/**
930+
* Test custom overridden SdlFile equals method
931+
*/
932+
public void testSdlFileEquals() {
933+
// Case 1: object is null, assertFalse
934+
SdlFile artwork1 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, true);
935+
SdlFile artwork2 = null;
936+
assertFalse(artwork1.equals(artwork2));
937+
938+
// Case 2 SoftButtonObjects are the same, assertTrue
939+
assertTrue(artwork1.equals(artwork1));
940+
941+
// Case 3: object is not an instance of SoftButtonObject, assertFalse
942+
assertFalse(artwork1.equals("Test"));
943+
944+
// Case 4: different StaticIcon status, assertFalse
945+
artwork1.setStaticIcon(true);
946+
artwork2 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, true);
947+
artwork2.setStaticIcon(false);
948+
assertFalse(artwork1.equals(artwork2));
949+
950+
// Case 5: different Persistent status, assertFalse
951+
artwork1 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, false);
952+
artwork2 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, true);
953+
assertFalse(artwork1.equals(artwork2));
954+
955+
// Case 6: different name, assertFalse
956+
artwork2 = new SdlFile("image2", FileType.GRAPHIC_PNG, 1, false);
957+
assertFalse(artwork1.equals(artwork2));
958+
959+
// Case 7: different Uri
960+
Uri uri1 = Uri.parse("testUri1");
961+
Uri uri2 = Uri.parse("testUri2");
962+
artwork1 = new SdlFile("image1", FileType.GRAPHIC_PNG, uri1, false);
963+
artwork2 = new SdlFile("image1", FileType.GRAPHIC_PNG, uri2, false);
964+
assertFalse(artwork1.equals(artwork2));
965+
966+
// Case 8: different FileData
967+
artwork1 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, false);
968+
artwork2 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, false);
969+
byte[] GENERAL_BYTE_ARRAY2 = new byte[2];
970+
artwork1.setFileData(Test.GENERAL_BYTE_ARRAY);
971+
artwork2.setFileData(GENERAL_BYTE_ARRAY2);
972+
assertFalse(artwork1.equals(artwork2));
973+
974+
// Case 9 different FileType, assertFalse
975+
artwork1 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, false);
976+
artwork2 = new SdlFile("image1", FileType.AUDIO_WAVE, 1, false);
977+
assertFalse(artwork1.equals(artwork2));
978+
979+
// Case 10: they are equal, assertTrue
980+
artwork1 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, false);
981+
artwork2 = new SdlFile("image1", FileType.GRAPHIC_PNG, 1, false);
982+
assertTrue(artwork1.equals(artwork2));
983+
}
928984
}

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/SdlArtworkTests.java renamed to android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlArtworkTests.java

File renamed without changes.
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
/*
2+
* Copyright (c) 2019 Livio, Inc.
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions are met:
7+
*
8+
* Redistributions of source code must retain the above copyright notice, this
9+
* list of conditions and the following disclaimer.
10+
*
11+
* Redistributions in binary form must reproduce the above copyright notice,
12+
* this list of conditions and the following
13+
* disclaimer in the documentation and/or other materials provided with the
14+
* distribution.
15+
*
16+
* Neither the name of the Livio Inc. nor the names of its contributors
17+
* may be used to endorse or promote products derived from this software
18+
* without specific prior written permission.
19+
*
20+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30+
* POSSIBILITY OF SUCH DAMAGE.
31+
*/
32+
33+
package com.smartdevicelink.managers.file.filetypes;
34+
35+
import com.smartdevicelink.AndroidTestCase2;
36+
import com.smartdevicelink.test.Test;
37+
38+
public class SdlFileTests extends AndroidTestCase2 {
39+
40+
public void testConstructorWithNoParams() {
41+
SdlFile sdlFile;
42+
43+
// Case 1 (Setting data)
44+
sdlFile = new SdlFile();
45+
sdlFile.setFileData(Test.GENERAL_BYTE_ARRAY);
46+
assertEquals(sdlFile.getFileData(), Test.GENERAL_BYTE_ARRAY);
47+
sdlFile.setName(null);
48+
assertEquals(sdlFile.getName(), "e9800998ecf8427e");
49+
sdlFile.setName(Test.GENERAL_STRING);
50+
assertEquals(sdlFile.getName(), Test.GENERAL_STRING);
51+
sdlFile.setType(Test.GENERAL_FILETYPE);
52+
assertEquals(sdlFile.getType(), Test.GENERAL_FILETYPE);
53+
sdlFile.setPersistent(Test.GENERAL_BOOLEAN);
54+
assertEquals(sdlFile.isPersistent(), Test.GENERAL_BOOLEAN);
55+
56+
// Case 2 (Setting resourceId)
57+
sdlFile = new SdlFile();
58+
sdlFile.setResourceId(Test.GENERAL_INTEGER);
59+
assertEquals((Integer) sdlFile.getResourceId(), Test.GENERAL_INTEGER);
60+
sdlFile.setName(null);
61+
assertEquals(sdlFile.getName(), "ec9ebc78777cf40d");
62+
sdlFile.setName(Test.GENERAL_STRING);
63+
assertEquals(sdlFile.getName(), Test.GENERAL_STRING);
64+
sdlFile.setType(Test.GENERAL_FILETYPE);
65+
assertEquals(sdlFile.getType(), Test.GENERAL_FILETYPE);
66+
sdlFile.setPersistent(Test.GENERAL_BOOLEAN);
67+
assertEquals(sdlFile.isPersistent(), Test.GENERAL_BOOLEAN);
68+
69+
// Case 3 (Setting URI)
70+
sdlFile = new SdlFile();
71+
sdlFile.setUri(Test.GENERAL_URI);
72+
assertEquals(sdlFile.getUri(), Test.GENERAL_URI);
73+
sdlFile.setName(null);
74+
assertEquals(sdlFile.getName(), "d3467db131372140");
75+
sdlFile.setName(Test.GENERAL_STRING);
76+
assertEquals(sdlFile.getName(), Test.GENERAL_STRING);
77+
sdlFile.setType(Test.GENERAL_FILETYPE);
78+
assertEquals(sdlFile.getType(), Test.GENERAL_FILETYPE);
79+
sdlFile.setPersistent(Test.GENERAL_BOOLEAN);
80+
assertEquals(sdlFile.isPersistent(), Test.GENERAL_BOOLEAN);
81+
}
82+
83+
public void testConstructorWithResourceId() {
84+
// Case1 (Set the name manually)
85+
SdlFile sdlFile1 = new SdlFile(Test.GENERAL_STRING, Test.GENERAL_FILETYPE, Test.GENERAL_INTEGER, Test.GENERAL_BOOLEAN);
86+
assertEquals(sdlFile1.getName(), Test.GENERAL_STRING);
87+
assertEquals(sdlFile1.getType(), Test.GENERAL_FILETYPE);
88+
assertEquals((Integer) sdlFile1.getResourceId(), Test.GENERAL_INTEGER);
89+
assertEquals(sdlFile1.isPersistent(), Test.GENERAL_BOOLEAN);
90+
91+
// Case2 (Let the library generate a name)
92+
SdlFile sdlFile2 = new SdlFile(null, Test.GENERAL_FILETYPE, Test.GENERAL_INTEGER, Test.GENERAL_BOOLEAN);
93+
SdlFile sdlFile3 = new SdlFile(null, Test.GENERAL_FILETYPE, Test.GENERAL_INTEGER, Test.GENERAL_BOOLEAN);
94+
assertEquals(sdlFile2.getName(), sdlFile3.getName());
95+
assertEquals(sdlFile2.getName(), "ec9ebc78777cf40d");
96+
assertEquals(sdlFile2.getType(), Test.GENERAL_FILETYPE);
97+
assertEquals((Integer) sdlFile2.getResourceId(), Test.GENERAL_INTEGER);
98+
assertEquals(sdlFile2.isPersistent(), Test.GENERAL_BOOLEAN);
99+
}
100+
101+
public void testConstructorWithData() {
102+
// Case1 (Set the name manually)
103+
SdlFile sdlFile1 = new SdlFile(Test.GENERAL_STRING, Test.GENERAL_FILETYPE, Test.GENERAL_BYTE_ARRAY, Test.GENERAL_BOOLEAN);
104+
assertEquals(sdlFile1.getName(), Test.GENERAL_STRING);
105+
assertEquals(sdlFile1.getType(), Test.GENERAL_FILETYPE);
106+
assertEquals(sdlFile1.getFileData(), Test.GENERAL_BYTE_ARRAY);
107+
assertEquals(sdlFile1.isPersistent(), Test.GENERAL_BOOLEAN);
108+
109+
// Case2 (Let the library generate a name)
110+
SdlFile sdlFile2 = new SdlFile(null, Test.GENERAL_FILETYPE, Test.GENERAL_BYTE_ARRAY, Test.GENERAL_BOOLEAN);
111+
SdlFile sdlFile3 = new SdlFile(null, Test.GENERAL_FILETYPE, Test.GENERAL_BYTE_ARRAY, Test.GENERAL_BOOLEAN);
112+
assertEquals(sdlFile2.getName(), sdlFile3.getName());
113+
assertEquals(sdlFile2.getName(), "e9800998ecf8427e");
114+
assertEquals(sdlFile2.getType(), Test.GENERAL_FILETYPE);
115+
assertEquals(sdlFile2.getFileData(), Test.GENERAL_BYTE_ARRAY);
116+
assertEquals(sdlFile2.isPersistent(), Test.GENERAL_BOOLEAN);
117+
}
118+
119+
public void testConstructorWithUri() {
120+
// Case1 (Set the name manually)
121+
SdlFile sdlFile1 = new SdlFile(Test.GENERAL_STRING, Test.GENERAL_FILETYPE, Test.GENERAL_URI, Test.GENERAL_BOOLEAN);
122+
assertEquals(sdlFile1.getName(), Test.GENERAL_STRING);
123+
assertEquals(sdlFile1.getType(), Test.GENERAL_FILETYPE);
124+
assertEquals(sdlFile1.getUri(), Test.GENERAL_URI);
125+
assertEquals(sdlFile1.isPersistent(), Test.GENERAL_BOOLEAN);
126+
127+
// Case2 (Let the library generate a name)
128+
SdlFile sdlFile2 = new SdlFile(null, Test.GENERAL_FILETYPE, Test.GENERAL_URI, Test.GENERAL_BOOLEAN);
129+
SdlFile sdlFile3 = new SdlFile(null, Test.GENERAL_FILETYPE, Test.GENERAL_URI, Test.GENERAL_BOOLEAN);
130+
assertEquals(sdlFile2.getName(), sdlFile3.getName());
131+
assertEquals(sdlFile2.getName(), "d3467db131372140");
132+
assertEquals(sdlFile2.getType(), Test.GENERAL_FILETYPE);
133+
assertEquals(sdlFile2.getUri(), Test.GENERAL_URI);
134+
assertEquals(sdlFile2.isPersistent(), Test.GENERAL_BOOLEAN);
135+
}
136+
}

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

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import com.smartdevicelink.protocol.enums.FunctionID;
1010
import com.smartdevicelink.proxy.interfaces.ISdl;
1111
import com.smartdevicelink.proxy.rpc.Image;
12+
import com.smartdevicelink.proxy.rpc.OnButtonEvent;
13+
import com.smartdevicelink.proxy.rpc.OnButtonPress;
1214
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
1315
import com.smartdevicelink.proxy.rpc.Show;
1416
import com.smartdevicelink.proxy.rpc.SoftButton;
@@ -25,6 +27,7 @@
2527
import org.mockito.invocation.InvocationOnMock;
2628
import org.mockito.stubbing.Answer;
2729

30+
import java.util.ArrayList;
2831
import java.util.Arrays;
2932
import java.util.Collections;
3033
import java.util.List;
@@ -305,4 +308,101 @@ public void testAssigningIdsToSoftButtonObjects() {
305308
assertEquals("SoftButtonObject id doesn't match the expected value", 100, sbo4.getButtonId());
306309
assertEquals("SoftButtonObject id doesn't match the expected value", 103, sbo5.getButtonId());
307310
}
311+
312+
/**
313+
* Test custom overridden softButtonObject equals method
314+
*/
315+
public void testSoftButtonObjectEquals() {
316+
SoftButtonObject softButtonObject1;
317+
SoftButtonObject softButtonObject2;
318+
319+
SoftButtonObject.OnEventListener testOnEventList1 = new SoftButtonObject.OnEventListener() {
320+
@Override
321+
public void onPress(SoftButtonObject softButtonObject, OnButtonPress onButtonPress) {
322+
}
323+
324+
@Override
325+
public void onEvent(SoftButtonObject softButtonObject, OnButtonEvent onButtonEvent) {
326+
}
327+
};
328+
329+
SoftButtonObject.OnEventListener testOnEventList2 = new SoftButtonObject.OnEventListener() {
330+
@Override
331+
public void onPress(SoftButtonObject softButtonObject, OnButtonPress onButtonPress) {
332+
}
333+
334+
@Override
335+
public void onEvent(SoftButtonObject softButtonObject, OnButtonEvent onButtonEvent) {
336+
}
337+
};
338+
339+
// Case 1: object is null, assertFalse
340+
softButtonObject1 = new SoftButtonObject("test", softButtonState1, null);
341+
softButtonObject2 = null;
342+
assertFalse(softButtonObject1.equals(softButtonObject2));
343+
344+
// Case 2 SoftButtonObjects are the same, assertTrue
345+
assertTrue(softButtonObject1.equals(softButtonObject1));
346+
347+
// Case 3: object is not an instance of SoftButtonObject assertFalse
348+
SdlArtwork artwork = new SdlArtwork("image1", FileType.GRAPHIC_PNG, 1, true);
349+
assertFalse(softButtonObject1.equals(artwork));
350+
351+
// Case 4: SoftButtonObjectState List are not same size, assertFalse
352+
List<SoftButtonState> softButtonStateList = new ArrayList<>();
353+
List<SoftButtonState> softButtonStateList2 = new ArrayList<>();
354+
softButtonStateList.add(softButtonState1);
355+
softButtonStateList2.add(softButtonState1);
356+
softButtonStateList2.add(softButtonState2);
357+
softButtonObject1 = new SoftButtonObject("hi", softButtonStateList, "Hi", null);
358+
softButtonObject2 = new SoftButtonObject("hi", softButtonStateList2, "Hi", null);
359+
assertFalse(softButtonObject1.equals(softButtonObject2));
360+
361+
// Case 5: SoftButtonStates are not the same, assertFalse
362+
softButtonObject1 = new SoftButtonObject("test", softButtonState1, null);
363+
softButtonObject2 = new SoftButtonObject("test", softButtonState2, null);
364+
assertFalse(softButtonObject1.equals(softButtonObject2));
365+
366+
// Case 6: SoftButtonObject names are not same, assertFalse
367+
softButtonObject1 = new SoftButtonObject("test", softButtonState1, null);
368+
softButtonObject2 = new SoftButtonObject("test23123", softButtonState1, null);
369+
assertFalse(softButtonObject1.equals(softButtonObject2));
370+
371+
// Case 7: SoftButtonObject currentStateName not same, assertFalse
372+
softButtonObject1 = new SoftButtonObject("hi", softButtonStateList, "Hi", null);
373+
softButtonObject2 = new SoftButtonObject("hi", softButtonStateList, "Hi2", null);
374+
assertFalse(softButtonObject1.equals(softButtonObject2));
375+
}
376+
377+
/**
378+
* Test custom overridden softButtonState equals method
379+
*/
380+
public void testSoftButtonStateEquals() {
381+
assertFalse(softButtonState1.equals(softButtonState2));
382+
SdlArtwork artwork1 = new SdlArtwork("image1", FileType.GRAPHIC_PNG, 1, true);
383+
SdlArtwork artwork2 = new SdlArtwork("image2", FileType.GRAPHIC_PNG, 1, true);
384+
385+
// Case 1: object is null, assertFalse
386+
softButtonState1 = new SoftButtonState("object1-state1", "o1s1", artwork1);
387+
softButtonState2 = null;
388+
assertFalse(softButtonState1.equals(softButtonState2));
389+
390+
// Case 2 SoftButtonObjects are the same, assertTrue
391+
assertTrue(softButtonState1.equals(softButtonState1));
392+
393+
// Case 3: object is not an instance of SoftButtonState, assertFalse
394+
assertFalse(softButtonState1.equals(artwork1));
395+
396+
// Case 4: different artwork, assertFalse
397+
softButtonState2 = new SoftButtonState("object1-state1", "o1s1", artwork2);
398+
assertFalse(softButtonState1.equals(softButtonState2));
399+
400+
// Case 5: different name, assertFalse
401+
softButtonState2 = new SoftButtonState("object1-state1 different name", "o1s1", artwork1);
402+
assertFalse(softButtonState1.equals(softButtonState2));
403+
404+
// Case 6 they are equal, assertTrue
405+
softButtonState2 = new SoftButtonState("object1-state1", "o1s1", artwork1);
406+
assertTrue(softButtonState1.equals(softButtonState2));
407+
}
308408
}

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/video/VideoStreamManagerTests.java

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@
1919
import com.smartdevicelink.proxy.rpc.ImageResolution;
2020
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
2121
import com.smartdevicelink.proxy.rpc.OnTouchEvent;
22+
import com.smartdevicelink.proxy.rpc.RegisterAppInterface;
23+
import com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse;
2224
import com.smartdevicelink.proxy.rpc.TouchCoord;
2325
import com.smartdevicelink.proxy.rpc.TouchEvent;
26+
import com.smartdevicelink.proxy.rpc.VehicleType;
2427
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
2528
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType;
2629
import com.smartdevicelink.proxy.rpc.enums.TouchType;
@@ -100,6 +103,12 @@ public void testInitialization(){
100103
ISdl internalInterface = mock(ISdl.class);
101104
when(internalInterface.getProtocolVersion()).thenReturn(new Version(5,1,0));
102105

106+
RegisterAppInterfaceResponse mockRegisterAppInterfaceResponse = new RegisterAppInterfaceResponse();
107+
VehicleType mockVehicleType = new VehicleType();
108+
mockVehicleType.setMake("Ford");
109+
mockRegisterAppInterfaceResponse.setVehicleType(mockVehicleType);
110+
when(internalInterface.getRegisterAppInterfaceResponse()).thenReturn(mockRegisterAppInterfaceResponse);
111+
103112
Answer<Void> onAddServiceListener = new Answer<Void>() {
104113
@Override
105114
public Void answer(InvocationOnMock invocation) {
@@ -127,6 +136,13 @@ public void testHMILevelNotFull(){
127136
final ISdl internalInterface = mock(ISdl.class);
128137

129138
when(internalInterface.getProtocolVersion()).thenReturn((new Version(5,0,0)));
139+
140+
RegisterAppInterfaceResponse mockRegisterAppInterfaceResponse = new RegisterAppInterfaceResponse();
141+
VehicleType mockVehicleType = new VehicleType();
142+
mockVehicleType.setMake("Ford");
143+
mockRegisterAppInterfaceResponse.setVehicleType(mockVehicleType);
144+
when(internalInterface.getRegisterAppInterfaceResponse()).thenReturn(mockRegisterAppInterfaceResponse);
145+
130146
when(internalInterface.isCapabilitySupported(SystemCapabilityType.VIDEO_STREAMING)).thenReturn(true);
131147

132148
final VideoStreamManager videoStreamManager = new VideoStreamManager(internalInterface);
@@ -144,6 +160,12 @@ public void onComplete(boolean success) {
144160
public void testRemoteDisplayStream(){
145161
ISdl internalInterface = mock(ISdl.class);
146162

163+
RegisterAppInterfaceResponse mockRegisterAppInterfaceResponse = new RegisterAppInterfaceResponse();
164+
VehicleType mockVehicleType = new VehicleType();
165+
mockVehicleType.setMake("Ford");
166+
mockRegisterAppInterfaceResponse.setVehicleType(mockVehicleType);
167+
when(internalInterface.getRegisterAppInterfaceResponse()).thenReturn(mockRegisterAppInterfaceResponse);
168+
147169
final Set<Object> listenerSet = new HashSet<>();
148170

149171
when(internalInterface.getProtocolVersion()).thenReturn(new Version(5,0,0));
@@ -253,6 +275,13 @@ public void onComplete(boolean success) {
253275

254276
public void testConvertTouchEvent() {
255277
ISdl internalInterface = mock(ISdl.class);
278+
279+
RegisterAppInterfaceResponse mockRegisterAppInterfaceResponse = new RegisterAppInterfaceResponse();
280+
VehicleType mockVehicleType = new VehicleType();
281+
mockVehicleType.setMake("Ford");
282+
mockRegisterAppInterfaceResponse.setVehicleType(mockVehicleType);
283+
when(internalInterface.getRegisterAppInterfaceResponse()).thenReturn(mockRegisterAppInterfaceResponse);
284+
256285
VideoStreamManager videoStreamManager = new VideoStreamManager(internalInterface);
257286
List<MotionEvent> motionEventList;
258287
long e1TS = 1558124390L, e2TS = 1558125390L, e3TS = 1558126390L;
@@ -468,6 +497,12 @@ public void testConvertTouchEvent_Scale_1_5() {
468497
private void assertMotionEventWithScale(int width, int height, float scale) {
469498
ISdl internalInterface = mock(ISdl.class);
470499

500+
RegisterAppInterfaceResponse mockRegisterAppInterfaceResponse = new RegisterAppInterfaceResponse();
501+
VehicleType mockVehicleType = new VehicleType();
502+
mockVehicleType.setMake("Ford");
503+
mockRegisterAppInterfaceResponse.setVehicleType(mockVehicleType);
504+
when(internalInterface.getRegisterAppInterfaceResponse()).thenReturn(mockRegisterAppInterfaceResponse);
505+
471506
// Preferred Resolution capability
472507
ImageResolution resolution = new ImageResolution(width, height);
473508

0 commit comments

Comments
 (0)