1 package org.robolectric.shadows; 2 3 import static org.assertj.core.api.Assertions.assertThat; 4 5 import android.view.InputDevice; 6 import org.junit.Test; 7 import org.junit.runner.RunWith; 8 import org.robolectric.RobolectricTestRunner; 9 10 @RunWith(RobolectricTestRunner.class) 11 public class ShadowInputDeviceTest { 12 @Test 13 public void canConstructInputDeviceWithName() throws Exception { 14 InputDevice inputDevice = ShadowInputDevice.makeInputDeviceNamed("foo"); 15 assertThat(inputDevice.getName()).isEqualTo("foo"); 16 } 17 } 18