mardi 31 mars 2015

assert which layout is loaded?

i am setting two different layouts,one for landscape mode and one for portrait mode. now i want to assert which one is set public void testOrienationChange() {



getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
getInstrumentation().waitForIdleSync();
assert which one is visible/set
getActivity().setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
assert which one is visible/set


how to test which layout is set or visible from test class?


Aucun commentaire:

Enregistrer un commentaire