Package com.jitcaforwin.extended.impl.internal.factories

Examples of com.jitcaforwin.extended.impl.internal.factories.TrackFactory


  @BeforeClass
  public static void setup() throws JitcaException{
    libraryMock = EasyMock.createMock(UserLibraryImpl.class);

    TrackCollectionImpl trackCollectionMock = EasyMock.createMock(TrackCollectionImpl.class);
    TrackFactory trackFactoryMock = EasyMock.createMock(TrackFactory.class);

    EasyMock.expect(trackFactoryMock.isLazy()).andReturn(false).anyTimes();
    EasyMock.expect(libraryMock.isLazy()).andReturn(false).anyTimes();
    EasyMock.expect(trackFactoryMock.getTracksOfAlbum("Test-Album-Name")).andReturn(trackCollectionMock);
    EasyMock.expect(libraryMock.getTracksOfAlbum("Test-Album-Name")).andReturn(trackCollectionMock);
    EasyMock.expect(trackFactoryMock.getTracksOfArtist("Test-Artist-Name")).andReturn(trackCollectionMock);
    EasyMock.expect(trackFactoryMock.getTracksOfComposer("Test-Artist-Name")).andReturn(trackCollectionMock);
    EasyMock.expect(trackFactoryMock.getTracksOfArtist("Test-Composer-Name")).andReturn(trackCollectionMock);
    EasyMock.expect(trackFactoryMock.getTracksOfComposer("Test-Composer-Name")).andReturn(trackCollectionMock);
    EasyMock.expect(libraryMock.getTrackFactory()).andReturn(trackFactoryMock).anyTimes();
    EasyMock.expect(trackCollectionMock.iterator()).andReturn(new LinkedList<Track>().iterator()).anyTimes();

    EasyMock.replay(libraryMock);
    EasyMock.replay(trackFactoryMock);
View Full Code Here


  @Test
  public void testCreateAlbum() throws JitcaException {
    UserLibraryImpl libraryMock = EasyMock.createMock(UserLibraryImpl.class);
   
    TrackFactory trackFactoryMock = EasyMock.createMock(TrackFactory.class);
    TrackCollectionImpl trackCollectionMock = EasyMock.createMock(TrackCollectionImpl.class);
   
    EasyMock.expect(libraryMock.isLazy()).andReturn(true).anyTimes();
    EasyMock.expect(libraryMock.getTracksOfArtist("Nelly Furtado")).andReturn(trackCollectionMock);
    EasyMock.expect(trackFactoryMock.getTracksOfArtist("Nelly Furtado")).andReturn(trackCollectionMock);
    EasyMock.expect(libraryMock.getTracksOfComposer("Nelly Furtado")).andReturn(trackCollectionMock);
    EasyMock.expect(trackFactoryMock.getTracksOfComposer("Nelly Furtado")).andReturn(trackCollectionMock)
    EasyMock.expect(libraryMock.getTracksOfAlbum("Loose")).andReturn(trackCollectionMock).anyTimes();
    EasyMock.expect(libraryMock.getTracksOfAlbum("Folklore")).andReturn(trackCollectionMock);
    EasyMock.expect(libraryMock.getTrackFactory()).andReturn(trackFactoryMock).anyTimes();
    EasyMock.expect(trackCollectionMock.iterator()).andReturn(new LinkedList<Track>().iterator()).anyTimes();
   
View Full Code Here

    libraryMock = EasyMock.createMock(UserLibraryImpl.class);
  }

  @Before
  public void setupForEachMethod() {
    TrackFactory trackFactoryMock = EasyMock.createMock(TrackFactory.class);

    EasyMock.reset(libraryMock);
    EasyMock.expect(libraryMock.getTrackFactory()).andReturn(trackFactoryMock);
    EasyMock.expect(libraryMock.isLazy()).andReturn(false).anyTimes();
    EasyMock.replay(trackFactoryMock);
View Full Code Here

    this.artistFactory = new ArtistFactory(this);
    this.genreFactory = new GenreFactory(this);
    this.playlistFactory = new PlaylistFactory(this, iTunes);
    this.eqPresetFactory = new EQPresetFactory(iTunes);

    this.trackFactory = new TrackFactory(this);
    this.searchService = new SearchService(itPlaylist, this);
  }
View Full Code Here

public class TrackCollectionInitTest {

  @Test
  public void testInitCollectionFromITCollection() throws JitcaException {
    UserLibraryImpl libraryMock = EasyMock.createMock(UserLibraryImpl.class);
    TrackFactory trackFactoryMock = EasyMock.createMock(TrackFactory.class);
    IITTrack itThrillerMock = EasyMock.createMock(IITTrack.class);
    IITTrack itBeatItMock = EasyMock.createMock(IITTrack.class);
    IITTrack itBillyJeanMock = EasyMock.createMock(IITTrack.class);
    IITTrackCollection itTrackCollectionMock = EasyMock.createMock(IITTrackCollection.class);
    TrackImpl thrillerMock = EasyMock.createMock(TrackImpl.class);
    TrackImpl beatItMock = EasyMock.createMock(TrackImpl.class);
    TrackImpl billyJeanMock = EasyMock.createMock(TrackImpl.class);
   
    EasyMock.expect(libraryMock.isLazy()).andReturn(false).anyTimes();
    EasyMock.expect(libraryMock.getTrackFactory()).andReturn(trackFactoryMock);
   
    EasyMock.expect(trackFactoryMock.getTrack(itThrillerMock)).andReturn(thrillerMock);
    EasyMock.expect(trackFactoryMock.getTrack(itBeatItMock)).andReturn(beatItMock);
    EasyMock.expect(trackFactoryMock.getTrack(itBillyJeanMock)).andReturn(billyJeanMock);
   
    EasyMock.expect(itTrackCollectionMock.itemByPlayOrder(1)).andReturn(itThrillerMock);
    EasyMock.expect(itTrackCollectionMock.itemByPlayOrder(2)).andReturn(itBeatItMock);
    EasyMock.expect(itTrackCollectionMock.itemByPlayOrder(3)).andReturn(itBillyJeanMock);
    EasyMock.expect(itTrackCollectionMock.getCount()).andReturn(3l).times(4);
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.impl.internal.factories.TrackFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.