mardi 26 mai 2020

How to check if an activity has changed Android Studio

Im trying to write a junit test to see if clicking a button has changed the activity. I have the following start of a test, but how Can i check whether a new activity has begun?

    @Rule
    public ActivityTestRule<SignIn> mActivityTestRule = new ActivityTestRule<SignIn>(SignIn.class);

    private SignIn mSignIn = null;

    @Test
    public void testInput() {
        assertNotNull(mSignIn.findViewById(R.id.signInButton)); 


        mSignIn.findViewById(R.id.signInButton).performClick(); 



    }
}

Aucun commentaire:

Enregistrer un commentaire