Search in sources :

Example 1 with SimpleMusicProviderSource

use of com.example.android.uamp.utils.SimpleMusicProviderSource in project android-UniversalMusicPlayer by googlesamples.

the class MusicProviderTest method setupMusicProvider.

@Before
public void setupMusicProvider() throws Exception {
    SimpleMusicProviderSource source = new SimpleMusicProviderSource();
    source.add("Music 1", "Album 1", "Smith Singer", "Genre 1", "https://examplemusic.com/music1.mp3", "https://icons.com/album1.png", 1, 3, 3200);
    source.add("Music 2", "Album 1", "Joe Singer", "Genre 1", "https://examplemusic.com/music2.mp3", "https://icons.com/album1.png", 2, 3, 3300);
    source.add("Music 3", "Album 1", "John Singer", "Genre 1", "https://examplemusic.com/music3.mp3", "https://icons.com/album1.png", 3, 3, 3400);
    source.add("Romantic Song 1", "Album 2", "Joe Singer", "Genre 2", "https://examplemusic.com/music4.mp3", "https://icons.com/album2.png", 1, 2, 4200);
    source.add("Romantic Song 2", "Album 2", "Joe Singer", "Genre 2", "https://examplemusic.com/music5.mp3", "https://icons.com/album2.png", 2, 2, 4200);
    provider = TestSetupHelper.setupMusicProvider(source);
}
Also used : SimpleMusicProviderSource(com.example.android.uamp.utils.SimpleMusicProviderSource) Before(org.junit.Before)

Example 2 with SimpleMusicProviderSource

use of com.example.android.uamp.utils.SimpleMusicProviderSource in project android-UniversalMusicPlayer by googlesamples.

the class QueueManagerTest method setupMusicProvider.

@Before
public void setupMusicProvider() throws Exception {
    SimpleMusicProviderSource source = new SimpleMusicProviderSource();
    populateMusicSource(source);
    provider = TestSetupHelper.setupMusicProvider(source);
}
Also used : SimpleMusicProviderSource(com.example.android.uamp.utils.SimpleMusicProviderSource) Before(org.junit.Before)

Example 3 with SimpleMusicProviderSource

use of com.example.android.uamp.utils.SimpleMusicProviderSource in project android-UniversalMusicPlayer by googlesamples.

the class PlaybackManagerTest method setUpMusicProvider.

@Before
public void setUpMusicProvider() throws Exception {
    SimpleMusicProviderSource source = new SimpleMusicProviderSource();
    populateMusicSource(source);
    musicProvider = TestSetupHelper.setupMusicProvider(source);
    resources = new MockResources() {

        @NonNull
        @Override
        public String getString(int id) throws NotFoundException {
            return "";
        }

        @NonNull
        @Override
        public String getString(int id, Object... formatArgs) throws NotFoundException {
            return "";
        }
    };
}
Also used : SimpleMusicProviderSource(com.example.android.uamp.utils.SimpleMusicProviderSource) NonNull(android.support.annotation.NonNull) MockResources(android.test.mock.MockResources) Before(org.junit.Before)

Aggregations

SimpleMusicProviderSource (com.example.android.uamp.utils.SimpleMusicProviderSource)3 Before (org.junit.Before)3 NonNull (android.support.annotation.NonNull)1 MockResources (android.test.mock.MockResources)1