diff options
Diffstat (limited to 'v1/src/test/java/com/xtremelabs/robolectric/shadows/InputMethodManagerTest.java')
-rw-r--r-- | v1/src/test/java/com/xtremelabs/robolectric/shadows/InputMethodManagerTest.java | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/v1/src/test/java/com/xtremelabs/robolectric/shadows/InputMethodManagerTest.java b/v1/src/test/java/com/xtremelabs/robolectric/shadows/InputMethodManagerTest.java deleted file mode 100644 index 5fedbfdff..000000000 --- a/v1/src/test/java/com/xtremelabs/robolectric/shadows/InputMethodManagerTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.xtremelabs.robolectric.shadows; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; - -import android.app.Activity; -import android.view.inputmethod.InputMethodManager; - -import com.xtremelabs.robolectric.Robolectric; -import com.xtremelabs.robolectric.WithTestDefaultsRunner; - -import static org.hamcrest.CoreMatchers.equalTo; -import static org.junit.Assert.assertThat; - -@RunWith(WithTestDefaultsRunner.class) -public class InputMethodManagerTest { - - private InputMethodManager manager; - private ShadowInputMethodManager shadow; - - @Before - public void setUp() throws Exception { - manager = (InputMethodManager) Robolectric.application.getSystemService(Activity.INPUT_METHOD_SERVICE); - shadow = Robolectric.shadowOf(manager); - } - - @Test - public void shouldRecordSoftInputVisibility() { - assertThat(shadow.isSoftInputVisible(), equalTo(false)); - - manager.showSoftInput(null, 0); - assertThat(shadow.isSoftInputVisible(), equalTo(true)); - - manager.hideSoftInputFromWindow(null, 0); - assertThat(shadow.isSoftInputVisible(), equalTo(false)); - } -} |