Search in sources :

Example 1 with TestOnLongClickListener

use of org.robolectric.android.TestOnLongClickListener in project robolectric by robolectric.

the class ShadowViewTest method performLongClick_shouldClickOnView.

@Test
public void performLongClick_shouldClickOnView() throws Exception {
    TestOnLongClickListener clickListener = new TestOnLongClickListener();
    view.setOnLongClickListener(clickListener);
    view.performLongClick();
    assertTrue(clickListener.clicked);
}
Also used : TestOnLongClickListener(org.robolectric.android.TestOnLongClickListener) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TestOnLongClickListener (org.robolectric.android.TestOnLongClickListener)1