Skip to content

Commit 353531d

Browse files
author
Robert Henigan
authored
Merge pull request #1532 from smartdevicelink/bugfix/fix_gen_imports
Fix AndroidX imports in RPC generator unit tests
2 parents 6d783cd + 9a7f4af commit 353531d

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

generator/test/test_functions.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_GetVehicleDataResponse(self):
6262
expected['function_id'] = 'GET_VEHICLE_DATA'
6363
expected['class_name'] = 'GetVehicleDataResponse'
6464
expected['extends_class'] = 'RPCResponse'
65-
expected['imports'] = ['android.support.annotation.NonNull', '',
65+
expected['imports'] = ['androidx.annotation.NonNull', '',
6666
'com.smartdevicelink.protocol.enums.FunctionID',
6767
'com.smartdevicelink.proxy.RPCResponse',
6868
'com.smartdevicelink.proxy.rpc.enums.Result',
@@ -86,7 +86,7 @@ def test_RegisterAppInterfaceResponse(self):
8686
expected['function_id'] = 'REGISTER_APP_INTERFACE'
8787
expected['class_name'] = 'RegisterAppInterfaceResponse'
8888
expected['extends_class'] = 'RPCResponse'
89-
expected['imports'] = ['android.support.annotation.NonNull', '',
89+
expected['imports'] = ['androidx.annotation.NonNull', '',
9090
'com.smartdevicelink.protocol.enums.FunctionID', 'com.smartdevicelink.proxy.RPCResponse',
9191
'com.smartdevicelink.proxy.rpc.enums.Language',
9292
'com.smartdevicelink.proxy.rpc.enums.Result', '', 'java.util.Hashtable']
@@ -108,7 +108,7 @@ def test_RegisterAppInterface(self):
108108
expected['function_id'] = 'REGISTER_APP_INTERFACE'
109109
expected['class_name'] = 'RegisterAppInterface'
110110
expected['extends_class'] = 'RPCRequest'
111-
expected['imports'] = ['android.support.annotation.NonNull', '',
111+
expected['imports'] = ['androidx.annotation.NonNull', '',
112112
'com.smartdevicelink.protocol.enums.FunctionID',
113113
'com.smartdevicelink.proxy.RPCRequest',
114114
'', 'java.util.Hashtable', 'java.util.List']
@@ -139,7 +139,7 @@ def test_PutFileRequest(self):
139139
expected['function_id'] = 'PUT_FILE'
140140
expected['class_name'] = 'PutFile'
141141
expected['extends_class'] = 'RPCRequest'
142-
expected['imports'] = ['android.support.annotation.NonNull', '',
142+
expected['imports'] = ['androidx.annotation.NonNull', '',
143143
'com.smartdevicelink.protocol.enums.FunctionID', 'com.smartdevicelink.proxy.RPCRequest',
144144
'com.smartdevicelink.proxy.rpc.enums.FileType', '', 'java.util.Hashtable']
145145
expected['description'] = ['Used to']
@@ -163,7 +163,7 @@ def test_OnEncodedSyncPDataNotification(self):
163163
expected['function_id'] = 'ON_ENCODED_SYNC_PDATA'
164164
expected['class_name'] = 'OnEncodedSyncPData'
165165
expected['extends_class'] = 'RPCNotification'
166-
expected['imports'] = ['android.support.annotation.NonNull', '',
166+
expected['imports'] = ['androidx.annotation.NonNull', '',
167167
'com.smartdevicelink.protocol.enums.FunctionID',
168168
'com.smartdevicelink.proxy.RPCNotification', '', 'java.util.Hashtable']
169169
expected['description'] = ['Callback including']
@@ -184,7 +184,7 @@ def test_DeleteCommand(self):
184184
expected['function_id'] = 'DELETE_COMMAND'
185185
expected['class_name'] = 'DeleteCommand'
186186
expected['extends_class'] = 'RPCRequest'
187-
expected['imports'] = ['android.support.annotation.NonNull', '',
187+
expected['imports'] = ['androidx.annotation.NonNull', '',
188188
'com.smartdevicelink.protocol.enums.FunctionID', 'com.smartdevicelink.proxy.RPCRequest',
189189
'', 'java.util.Hashtable']
190190
expected['params'] = (
@@ -204,7 +204,7 @@ def test_Alert(self):
204204
expected['function_id'] = 'ALERT'
205205
expected['class_name'] = 'Alert'
206206
expected['extends_class'] = 'RPCRequest'
207-
expected['imports'] = ['android.support.annotation.NonNull', '',
207+
expected['imports'] = ['androidx.annotation.NonNull', '',
208208
'com.smartdevicelink.protocol.enums.FunctionID',
209209
'com.smartdevicelink.proxy.RPCRequest', '', 'java.util.Hashtable']
210210
expected['params'] = (
@@ -225,7 +225,7 @@ def test_ReleaseInteriorVehicleDataModule(self):
225225
expected['function_id'] = 'RELEASE_INTERIOR_VEHICLE_DATA_MODULE'
226226
expected['class_name'] = 'ReleaseInteriorVehicleDataModule'
227227
expected['extends_class'] = 'RPCRequest'
228-
expected['imports'] = ['android.support.annotation.NonNull', '',
228+
expected['imports'] = ['androidx.annotation.NonNull', '',
229229
'com.smartdevicelink.protocol.enums.FunctionID',
230230
'com.smartdevicelink.proxy.RPCRequest', '', 'java.util.Hashtable']
231231
expected['params'] = (

generator/test/test_structs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_AudioPassThruCapabilities(self):
4040
'class_name': 'AudioPassThruCapabilities',
4141
'extends_class': 'RPCStruct',
4242
'package_name': 'com.smartdevicelink.proxy.rpc',
43-
'imports': ['android.support.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct',
43+
'imports': ['androidx.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct',
4444
'com.smartdevicelink.proxy.rpc.enums.SamplingRate',
4545
'com.smartdevicelink.util.SdlDataTypeConverter', '', 'java.util.Hashtable'],
4646
'deprecated': None,
@@ -68,7 +68,7 @@ def test_CloudAppProperties(self):
6868
'class_name': 'CloudAppProperties',
6969
'extends_class': 'RPCStruct',
7070
'package_name': 'com.smartdevicelink.proxy.rpc',
71-
'imports': ['android.support.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
71+
'imports': ['androidx.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
7272
'java.util.Hashtable', 'java.util.List'],
7373
'deprecated': None,
7474
'since': None,
@@ -86,7 +86,7 @@ def test_SoftButton(self):
8686
}, description=['\n Describes different audio type configurations for PerformAudioPassThru.\n '])
8787
expected = {
8888
'package_name': 'com.smartdevicelink.proxy.rpc',
89-
'imports': ['android.support.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
89+
'imports': ['androidx.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
9090
'java.util.Hashtable'],
9191
'class_name': 'SoftButton',
9292
'extends_class': 'RPCStruct',
@@ -107,7 +107,7 @@ def test_OASISAddress(self):
107107
})
108108
expected = {
109109
'package_name': 'com.smartdevicelink.proxy.rpc',
110-
'imports': ['android.support.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
110+
'imports': ['androidx.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
111111
'java.util.Hashtable'],
112112
'class_name': 'OASISAddress',
113113
'extends_class': 'RPCStruct',
@@ -127,7 +127,7 @@ def test_LocationDetails(self):
127127
})
128128
expected = {
129129
'package_name': 'com.smartdevicelink.proxy.rpc',
130-
'imports': ['android.support.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
130+
'imports': ['androidx.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
131131
'java.util.Hashtable'],
132132
'class_name': 'LocationDetails',
133133
'extends_class': 'RPCStruct',
@@ -147,7 +147,7 @@ def test_SingleTireStatus(self):
147147
})
148148
expected = {
149149
'package_name': 'com.smartdevicelink.proxy.rpc',
150-
'imports': ['android.support.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
150+
'imports': ['androidx.annotation.NonNull', '', 'com.smartdevicelink.proxy.RPCStruct', '',
151151
'java.util.Hashtable'],
152152
'class_name': 'SingleTireStatus',
153153
'extends_class': 'RPCStruct',

0 commit comments

Comments
 (0)