diff options
author | Tomasz Kosciuszko <tkosciuszko@google.com> | 2022-03-03 10:33:37 +0000 |
---|---|---|
committer | TreeHugger Robot <treehugger-gerrit@google.com> | 2022-03-07 16:47:41 +0000 |
commit | 0c62dd2c7e8f48f0d52afefb0991fafa4294de1a (patch) | |
tree | d1b506463ca1098d26c9e22ded986c624ebf788b /android/testSrc | |
parent | d275fee7e7ed92d83bbf748e3b7abe24d758d935 (diff) | |
download | idea-0c62dd2c7e8f48f0d52afefb0991fafa4294de1a.tar.gz |
[Surface Launching] Add a test with empty module
Verify with a test that complication configuration can deal with
null module. That is to make sure b/221417953 is fixed.
Fixes: 221424752
Tested: Unit test.
Change-Id: I9d51b1142d2965832c6982c436eeb64a2b0e0081
Diffstat (limited to 'android/testSrc')
-rw-r--r-- | android/testSrc/com/android/tools/idea/run/configuration/execution/AndroidComplicationConfigurationExecutorTest.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/android/testSrc/com/android/tools/idea/run/configuration/execution/AndroidComplicationConfigurationExecutorTest.kt b/android/testSrc/com/android/tools/idea/run/configuration/execution/AndroidComplicationConfigurationExecutorTest.kt index a1a6a61b049..cf51676bc47 100644 --- a/android/testSrc/com/android/tools/idea/run/configuration/execution/AndroidComplicationConfigurationExecutorTest.kt +++ b/android/testSrc/com/android/tools/idea/run/configuration/execution/AndroidComplicationConfigurationExecutorTest.kt @@ -343,4 +343,12 @@ class AndroidComplicationConfigurationExecutorTest : AndroidConfigurationExecuto "com.example.android.wearable.watchface.provider.IncrementingNumberComplicationProviderService") assertThat(types).isEqualTo(listOf(SHORT_TEXT, LONG_TEXT)) } + + fun testGetManifestNoModule() { + val configSettings = RunManager.getInstance(project).createConfiguration( + "run tile", AndroidComplicationConfigurationType().configurationFactories.single()) + val androidComplicationConfiguration = Mockito.spy(configSettings.configuration as AndroidComplicationConfiguration) + doReturn(null).`when`(androidComplicationConfiguration).module + assertThat(androidComplicationConfiguration.getTypesFromManifest()).isEqualTo(emptyList<Complication.ComplicationType>()) + } } |