Search in sources :

Example 1 with InputMethodSubtypeBuilder

use of android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder in project robolectric by robolectric.

the class ShadowInputMethodManagerTest method setCurrentInputMethodSubtype_isReturned.

/**
 * The builder is only available for 19+.
 */
@Config(minSdk = KITKAT)
@Test
public void setCurrentInputMethodSubtype_isReturned() {
    InputMethodSubtype inputMethodSubtype = new InputMethodSubtypeBuilder().build();
    shadow.setCurrentInputMethodSubtype(inputMethodSubtype);
    assertThat(manager.getCurrentInputMethodSubtype()).isEqualTo(inputMethodSubtype);
}
Also used : InputMethodSubtype(android.view.inputmethod.InputMethodSubtype) InputMethodSubtypeBuilder(android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder) Test(org.junit.Test) Config(org.robolectric.annotation.Config)

Aggregations

InputMethodSubtype (android.view.inputmethod.InputMethodSubtype)1 InputMethodSubtypeBuilder (android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder)1 Test (org.junit.Test)1 Config (org.robolectric.annotation.Config)1