Merge "Update KeyboardLayoutPickerControllerTest" into udc-dev
This commit is contained in:
@@ -93,13 +93,13 @@ public class KeyboardLayoutPickerControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testLifecycle_onStart_NoInputDevice_shouldFinish() {
|
public void testLifecycle_onStart_NoInputDevice_shouldReturn() {
|
||||||
final FragmentActivity activity = Robolectric.setupActivity(FragmentActivity.class);
|
final FragmentActivity activity = Robolectric.setupActivity(FragmentActivity.class);
|
||||||
when(mInputManager.getInputDeviceByDescriptor(anyString())).thenReturn(null);
|
when(mInputManager.getInputDeviceByDescriptor(anyString())).thenReturn(null);
|
||||||
when(mFragment.getActivity()).thenReturn(activity);
|
when(mFragment.getActivity()).thenReturn(activity);
|
||||||
|
|
||||||
mController.onStart();
|
mController.onStart();
|
||||||
assertThat(activity.isFinishing()).isTrue();
|
verify(mInputManager, never()).getEnabledKeyboardLayoutsForInputDevice(any());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Reference in New Issue
Block a user