Как я могу решить эту проблему:
В строке "import android.support.test.rule.ActivityTestRule;"слово "rule" имеет красный
, а в строке слова "ActivityTestRule" также имеют красный
public ActivityTestRule mActivityRule = new ActivityTestRule (AuthorizationPresenter.class);
package by.hjhj;
import android.support.test.espresso.NoMatchingViewException;
import android.support.test.rule.ActivityTestRule;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import by.belinvestbank.presenter.authorization.AuthorizationPresenter;
public class Authorization {
@Rule
public ActivityTestRule<AuthorizationPresenter> mActivityRule = new ActivityTestRule(AuthorizationPresenter.class);
@Before
public void SetUp()throws Exception{
Thread.sleep(4000);
try {
onView(allOf(withId(R.id.login),(isDisplayed()))).check(matches(isDisplayed()));
}
catch (NoMatchingViewException e) {
pressBack();
}
}
}