Android Test - Call Method

2

I would like to know if in the android Unit test would have the possibility to call isolated methods of the code, or if just calling activitys, buttons ... I researched in several places and I did not find anything talking about

    
asked by anonymous 11.07.2014 / 13:37

1 answer

1

You have full access to all activity methods either implicitly or explicitly.

Type:

public void testNomeAplicacao() {
      TextView nomeAplicacao = (TextView) demo.findViewById(R.id.nomeAplicacao);
      assertEquals(nomeAplicacao.getText().toString(), "Helo World, EuAndroid");

}

More information here

    
11.07.2014 / 16:43