@@ -0,0 +1,3282 @@
+package net.cattaka.android.adaptertoolbox.example;%0A%0Aimport android.content.res.Resources;%0Aimport android.support.test.rule.ActivityTestRule;%0Aimport android.view.View;%0A%0Aimport net.cattaka.android.adaptertoolbox.adapter.ScrambleAdapter;%0Aimport net.cattaka.android.adaptertoolbox.example.data.OrdinalLabel;%0Aimport net.cattaka.android.adaptertoolbox.example.logic.SnackbarLogic;%0Aimport net.cattaka.android.adaptertoolbox.example.test.RecyclerViewAnimatingIdlingResource;%0Aimport net.cattaka.android.adaptertoolbox.example.test.TestUtils;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0A%0Aimport static android.support.test.espresso.Espresso.onView;%0Aimport static android.support.test.espresso.action.ViewActions.click;%0Aimport static android.support.test.espresso.action.ViewActions.swipeDown;%0Aimport static android.support.test.espresso.action.ViewActions.swipeUp;%0Aimport static android.support.test.espresso.contrib.RecyclerViewActions.scrollToPosition;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withId;%0Aimport static net.cattaka.android.adaptertoolbox.example.test.TestUtils.find;%0Aimport static net.cattaka.android.adaptertoolbox.example.test.TestUtils.waitForIdlingResource;%0Aimport static net.cattaka.android.adaptertoolbox.example.test.TestUtils.withIdInRecyclerView;%0Aimport static org.hamcrest.Matchers.allOf;%0Aimport static org.hamcrest.Matchers.containsString;%0Aimport static org.mockito.Matchers.any;%0Aimport static org.mockito.Matchers.anyInt;%0Aimport static org.mockito.Matchers.argThat;%0Aimport static org.mockito.Mockito.spy;%0Aimport static org.mockito.Mockito.verify;%0A%0A/**%0A * Created by cattaka on 16/06/05.%0A */%0Apublic class SimpleStringExampleActivityTest %7B%0A    @Rule%0A    public ActivityTestRule%3CSimpleStringExampleActivity%3E mActivityTestRule = new ActivityTestRule%3C%3E(SimpleStringExampleActivity.class, false, false);%0A%0A    RecyclerViewAnimatingIdlingResource mRecyclerViewAnimatingIdlingResource;%0A    SimpleStringExampleActivity mActivity;%0A    ScrambleAdapter%3CObject%3E mAdapter;%0A%0A    @Before%0A    public void before() %7B%0A        mActivity = mActivityTestRule.launchActivity(null);%0A        mAdapter = (ScrambleAdapter%3CObject%3E) mActivity.mRecyclerView.getAdapter();%0A        mActivity.mSnackbarLogic = spy(new SnackbarLogic());%0A        mRecyclerViewAnimatingIdlingResource = new RecyclerViewAnimatingIdlingResource(mActivity.mRecyclerView);%0A    %7D%0A%0A    @Test%0A    public void scroll() %7B%0A        onView(withId(R.id.recycler)).perform(swipeUp());%0A        waitForIdlingResource(mRecyclerViewAnimatingIdlingResource, 5000);%0A        onView(withId(R.id.recycler)).perform(swipeDown());%0A        waitForIdlingResource(mRecyclerViewAnimatingIdlingResource, 5000);%0A    %7D%0A%0A    @Test%0A    public void clickItem_stringItem() %7B%0A        for (int i=0;i%3C10;i++) %7B%0A            TestUtils.Entry%3CString%3E entry = find(mAdapter.getItems(), String.class, i);%0A            onView(withId(R.id.recycler)).perform(scrollToPosition(entry.index));%0A            onView(withIdInRecyclerView(R.id.text, R.id.recycler, entry.index)).perform(click());%0A%0A            verify(mActivity.mSnackbarLogic).make(%0A                    any(View.class),%0A                    argThat(containsString(String.valueOf(entry.object))),%0A                    anyInt()%0A            );%0A        %7D%0A    %7D%0A%7D%0A

Add SimpleStringExampleActivityTest