// Path: ristretto/src/main/java/com/appsingularity/ristretto/Ristretto.java
// public static ViewInteraction withView(final int resourceId) {
//     // This is a placeholder to resolve the resourceId into a type.
//     return onView(with(resourceId));
// }


import static android.support.test.espresso.Espresso.onView;
import static com.appsingularity.ristretto.Ristretto.withView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;

public class WithText {

    public void foo() {
        withText(R.string.some_text).check(matches(isDisplayed())).perform(click());
        onView(withText(R.string.some_text)).check(matches(isDisplayed())).perform(click());
        withView(withText(R.string.some_text)).check(matches(isDisplayed())).perform(click());

// Path: ristretto/src/main/java/com/appsingularity/ristretto/Ristretto.java
// public static ViewInteraction withView(final int resourceId) {
//     // This is a placeholder to resolve the resourceId into a type.
//     return onView(with(resourceId));
// }


// Path: ristretto-lint-checks/src/test/resources/withtext/WithText.java
import static android.support.test.espresso.Espresso.onView;
import static com.appsingularity.ristretto.Ristretto.withView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withText;


public class WithText {

    public void foo() {
        withText(R.string.some_text).check(matches(isDisplayed())).perform(click());
        onView(withText(R.string.some_text)).check(matches(isDisplayed())).perform(click());
        withView(withText(R.string.some_text)).check(matches(isDisplayed())).perform(click());

        withText("some text").check(matches(isDisplayed())).perform(click());