2010-03-11から1日間の記事一覧

Instrumentationによるユニットテストでは直接ビューを触ってはいけない

ActivityInstrumentationTestCase2クラスなどを使用してActivityをテストする際に、うっかりテスト中で Button button = (Button)activity.findViewById(R.id.Button01); button.performClick(); などと書いてしまうと android.view.ViewRoot$CalledFromWron…