7

Mocking SQLite-Database while testing Activity with Robolectric

view full story
linux-howto

http://stackoverflow.com – In the past few days I started playing around with roboguice, robolectric and mockito. I have a small Android-application with a login-screen containing an AutoCompleteTextView for faster entering the username. The usernames for the AutoCompleteTextView are stored in a sqlite-database. public class MainActivity extends RoboActivity implements View.OnClickListener { @InjectView(R.id.startScreen_Login_Button) private Button loginButton; @InjectView(R.id.startScreen_Cancel_Button) private Button cancelButton; @InjectView(R.id.startScreen_forgotPwd_TextView) private TextView forgotPWTextView; @In (HowTos)