Android Open Source - RoboBinding-album-sample Test Data






From Project

Back to project page RoboBinding-album-sample.

License

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.albumsample.activity;
// w w  w  .jav  a 2 s  .  c  o  m
import org.robobinding.albumsample.model.Album;
import org.robobinding.albumsample.store.AlbumStore;

/**
 * @author Cheng Wei
 * @version $Revision: 1.0 $
 * @since 1.0
 */
public class TestData {
    public void setUp(AlbumStore albumStore) {
        albumStore.clear();

        albumStore.save(createNonClassical("HQ", "Roy Harper"));
        albumStore.save(createNonClassical("The Rough Dancer and Cyclical Night", "Astor Piazzola"));
        albumStore.save(createNonClassical("The Black Light", "Calexico"));
        albumStore.save(createNonClassical("Stormcock", "Roy Harper"));
        albumStore.save(createClassical("Symphony No.5", "CBSO", "Sibelius"));
        albumStore.save(createNonClassical("Greatest Hits", "Queen"));
        albumStore.save(createClassical("Symphony No.5", "Beethoven", "Beethoven"));
        albumStore.save(createNonClassical("Dire Straits", "Dire Straits"));
        albumStore.save(createNonClassical("Like a Virgin", "Madonna"));
    }

    private static Album createClassical(String title, String artist, String composer) {
        Album.Builder builder = initializeBuilder(title, artist);
        builder.setClassical(true).setComposer(composer);
        return builder.create();
    }

    private static Album createNonClassical(String title, String artist) {
        Album.Builder builder = initializeBuilder(title, artist);
        return builder.create();
    }

    private static Album.Builder initializeBuilder(String title, String artist) {
        Album.Builder builder = new Album.Builder();
        builder.setTitle(title).setArtist(artist);
        return builder;
    }

}




Java Source Code List

org.robobinding.albumsample.activity.AbstractActivity.java
org.robobinding.albumsample.activity.AlbumApp.java
org.robobinding.albumsample.activity.CreateEditAlbumActivity.java
org.robobinding.albumsample.activity.DeleteAlbumDialog.java
org.robobinding.albumsample.activity.HomeActivity.java
org.robobinding.albumsample.activity.TestData.java
org.robobinding.albumsample.activity.ViewAlbumActivity.java
org.robobinding.albumsample.activity.ViewAlbumsActivity.java
org.robobinding.albumsample.model.Album.java
org.robobinding.albumsample.presentationmodel.AlbumItemPresentationModel.java
org.robobinding.albumsample.presentationmodel.CreateEditAlbumPresentationModel.java
org.robobinding.albumsample.presentationmodel.CreateEditAlbumView.java
org.robobinding.albumsample.presentationmodel.DeleteAlbumPresentationModel.java
org.robobinding.albumsample.presentationmodel.DeleteAlbumView.java
org.robobinding.albumsample.presentationmodel.HomePresentationModel.java
org.robobinding.albumsample.presentationmodel.HomeView.java
org.robobinding.albumsample.presentationmodel.ViewAlbumPresentationModel.java
org.robobinding.albumsample.presentationmodel.ViewAlbumView.java
org.robobinding.albumsample.presentationmodel.ViewAlbumsPresentationModel.java
org.robobinding.albumsample.presentationmodel.ViewAlbumsView.java
org.robobinding.albumsample.store.AlbumStore.java
org.robobinding.albumsample.store.MemoryAlbumStore.java
org.robobinding.albumsampletest.AbstractAlbumsTest.java
org.robobinding.albumsampletest.AbstractSampleAppTest.java
org.robobinding.albumsampletest.AlbumTestData.java
org.robobinding.albumsampletest.CreateEditAlbumActivityTest.java
org.robobinding.albumsampletest.DeleteAlbumActivityTest.java
org.robobinding.albumsampletest.ViewAlbumActivityTest.java
org.robobinding.albumsampletest.ViewAlbumsActivityTest.java