use of com.android.tools.idea.run.AndroidDevice in project android by JetBrains.
the class MakeBeforeRunTaskProviderTest method multipleDeviceArguments.
@Test
public void multipleDeviceArguments() {
AndroidDevice device1 = mock(AndroidDevice.class);
AndroidDevice device2 = mock(AndroidDevice.class);
when(device1.getVersion()).thenReturn(new AndroidVersion(23, null));
when(device1.getDensity()).thenReturn(640);
when(device1.getAbis()).thenReturn(ImmutableList.of(Abi.ARMEABI, Abi.X86));
when(device2.getVersion()).thenReturn(new AndroidVersion(22, null));
when(device2.getDensity()).thenReturn(480);
when(device2.getAbis()).thenReturn(ImmutableList.of(Abi.X86, Abi.X86_64));
List<String> arguments = MakeBeforeRunTaskProvider.getDeviceSpecificArguments(ImmutableList.of(device1, device2));
assertTrue(arguments.contains("-Pandroid.injected.build.api=22"));
for (String argument : arguments) {
assertFalse("ABIs should not be passed to Gradle when there are multiple devices", argument.startsWith("-Pandroid.injected.build.abi"));
}
}
Aggregations