package com.ustwo.boilerplate.feature.helloworld;

import android.support.test.rule.ActivityTestRule;

import com.ustwo.boilerplate.R;

import org.junit.Rule;
import org.junit.Test;

import static android.support.test.espresso.Espresso.onView;
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.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;
import static org.hamcrest.Matchers.allOf;

public class HelloWorldActivityTest {

  @Rule
  public ActivityTestRule<HelloWorldActivity> activityTestRule = new ActivityTestRule<>
      (HelloWorldActivity.class, true, true);

  @Test
  public void helloWorld_textShown() {
    onView(withId(R.id.textView_helloWorld))
        .check(matches(allOf(withText(R.string.hello_world), isDisplayed())));
  }
}

Add test for Hello world activity
Add test for Hello world activity
