Android Open Source - RoboBinding-album-sample Abstract Albums Test

From Project

Back to project page RoboBinding-album-sample.


The source code is released under:

Apache License

If you think the Android project RoboBinding-album-sample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.robobinding.albumsampletest;
// www  . j av  a2 s  .  co m
import org.robobinding.albumsample.R;
import org.robobinding.albumsample.activity.ViewAlbumsActivity;
import org.robobinding.albumsample.model.Album;

import android.widget.ListView;

 * @since 1.0
 * @version $Revision: 1.0 $
 * @author Robert Taylor
 * @author Cheng Wei
public abstract class AbstractAlbumsTest extends AbstractSampleAppTest {
    protected void setUp() throws Exception {

    protected void navigateToAlbumListScreen() {

    protected Album setupAlbum(Album album) {;
  return album;

    protected void assertAlbumContentMatches(Album album) {
  if (!album.isClassical()) {
      assertTrue(solo.searchText("Not classical"));

    protected void assertNumberOfAlbums(int expectedAlbumSize) {
  solo.waitForActivity(ViewAlbumsActivity.class, 2000);
  ListView albumListView = (ListView)solo.getView(;
  int actualAlbumSize = albumListView.getCount();
  assertEquals(expectedAlbumSize, actualAlbumSize);

Java Source Code List