@@ -0,0 +1,2190 @@
+package se.chalmers.watchmetest.activity;%0A%0Aimport se.chalmers.watchme.R;%0Aimport se.chalmers.watchme.activity.MainActivity;%0Aimport se.chalmers.watchme.activity.MovieDetailsActivity;%0Aimport se.chalmers.watchmetest.Constants;%0Aimport android.test.ActivityInstrumentationTestCase2;%0Aimport android.view.View;%0Aimport android.widget.EditText;%0Aimport android.widget.RatingBar;%0Aimport android.widget.TextView;%0A%0Aimport com.jayway.android.robotium.solo.Solo;%0A%0Apublic class MovieDetailsActivityTest extends%0A%09%09ActivityInstrumentationTestCase2%3CMainActivity%3E %7B%0A%0A%09Solo solo;%0A%0A%09public MovieDetailsActivityTest() %7B%0A%09%09super(MainActivity.class);%0A%09%7D%0A%0A%09@Override%0A%09protected void setUp() throws Exception %7B%0A%09%09super.setUp();%0A%09%09solo = new Solo(getInstrumentation(), getActivity());%0A%09%7D%0A%0A%09@Override%0A%09public void tearDown() throws Exception %7B%0A%09%09// finish all activities that have been opened during test execution.%0A%09%09solo.finishOpenedActivities();%0A%09%7D%0A%09%0A%09public void testViewDetails() %7B%0A%09%09solo.clickOnText(%22Movies%22);%0A%09%09solo.clickOnActionBarItem(R.id.menu_add_movie);%0A%09%09solo.enterText(Constants.TITLE_FIELD, %223_TEST_MOVIE%22);%0A%09%09solo.setProgressBar(Constants.RATING_BAR, 1);%0A%09%09solo.clickOnText(%22Pick%22);%0A%09%09solo.setDatePicker(Constants.DATE_PICKER, 2014 - 1, 12, 24);%0A%09%09solo.clickOnText(%22Done%22);%0A%09%09solo.enterText(Constants.TAG_FIELD, %22Action%22);%0A%09%09solo.enterText(Constants.NOTE_FIELD, %22Mum said I'd like this%22);%0A%09%09solo.clickOnButton(Constants.ADD_MOVIE_BUTTON);%0A%09%09solo.clickOnText(%223_TEST_MOVIE%22);%0A%09%09solo.assertCurrentActivity(%22MovieDetailsActivty expected%22, MovieDetailsActivity.class);%0A%09%09%0A%09%09boolean isTitleFound = solo.searchText(%223_TEST_MOVIE%22);%0A%09%09assertTrue(isTitleFound);%0A%09%09%0A%09%09RatingBar ratingBar = (RatingBar) solo.getView(R.id.my_rating_bar);%0A%09%09assertTrue(ratingBar.getRating() == 1);%0A%09%09%0A%09%09TextView releaseDateLabel = (TextView) solo.getView(R.id.releaseDate);%0A%09%09assertTrue(releaseDateLabel.getText().equals(%2224 Jan, 2014%22));%0A%09%09%0A%09%09EditText noteField = (EditText) solo.getView(R.id.note_field_details);%0A%09%09assertTrue(noteField.getText().toString().equals(%22Mum said I'd like this%22));%0A%0A%09%09EditText tagField = (EditText) solo.getView(R.id.tag_field_details);%0A%09%09assertTrue(tagField.getText().toString().equals(%22action%22));%0A%09%7D%0A%7D

Add new file MovieDetailsActivityTest that contains test methods for MovieDetailsActivity