@@ -0,0 +1,2433 @@
+package fr.miage.paris10.projetm1.helpu;%0Aimport static android.support.test.espresso.Espresso.onView;%0Aimport static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;%0Aimport static android.support.test.espresso.action.ViewActions.typeText;%0Aimport static android.support.test.espresso.action.ViewActions.click;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withText;%0Aimport static android.support.test.espresso.matcher.ViewMatchers.withId;%0Aimport android.support.test.rule.ActivityTestRule;%0Aimport android.support.test.runner.AndroidJUnit4;%0Aimport static android.support.test.espresso.matcher.RootMatchers.withDecorView;%0Aimport static android.support.test.espresso.assertion.ViewAssertions.matches;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.Matchers.not;%0A%0A/**%0A * Created by dameimou on 07/03/2017.%0A */%0A%0A@RunWith(AndroidJUnit4.class)%0Apublic class LoginActivityTest %7B%0A    @Rule%0A    public ActivityTestRule%3CLoginActivity%3E loginActivityRule  = new ActivityTestRule%3C%3E(LoginActivity.class);%0A%0A%0A    @Test%0A    public void testGoodLogIn() %7B%0A        UserInformation u = new UserInformation(%22%22,%22%22,%22%22,%22%22);%0A        onView(withId(R.id.input_email))%0A                .perform(typeText(%2233012900@u-paris10.fr%22), closeSoftKeyboard());%0A        onView(withId(R.id.input_password)).perform(typeText(%22azerty%22), closeSoftKeyboard());%0A        onView(withId(R.id.btn_login)).perform(click());%0A    %7D%0A   @Test%0A    public void testFalseLogIn() %7B%0A       LoginActivity activity = loginActivityRule.getActivity();%0A        onView(withId(R.id.input_email))%0A                .perform(typeText(%22a@u-paris10.fr%22), closeSoftKeyboard());%0A        onView(withId(R.id.input_password)).perform(typeText(%22azerty%22), closeSoftKeyboard());%0A  //      onView(withId(R.id.btn_login)).perform(click());%0A  //             onView(withText(%22Login failed%22)).%0A  //                     inRoot(withDecorView(not(is(activity.getWindow().getDecorView())))).%0A  //                     check(matches(isDisplayed()));%0A    %7D%0A    //TODO%0A/*    @Test%0A    public void testLinkForgotPassword() %7B%0A       // onView(withId(R.id.link_reset_password)).perform(click());%0A    %7D%0A%0A    @Test%0A    public void testLinkSignUp() %7B%0A      //  onView(withId(R.id.link_signup)).perform(click());%0A    %7D*/%0A%7D%0A

add Instrumented Test for Login Activity