Package com.jitcaforwin.extended.impl.internal.track

Examples of com.jitcaforwin.extended.impl.internal.track.TrackImpl


    IITArtwork itArtwork3 = new ITArtworkMock(ARTWORK3);
    ((ITArtworkCollectionMock) itArtworkCollection).add(itArtwork1, 0);
    ((ITArtworkCollectionMock) itArtworkCollection).add(itArtwork2, 1);
    ((ITArtworkCollectionMock) itArtworkCollection).add(itArtwork3, 2);

    TrackImpl track = TrackImpl.create(libraryMock, new ITTrackMock(itArtworkCollection));

    ArtworkCollectionImpl artworkCollection = new ArtworkCollectionImpl(track);

    assertTrue(artworkCollection.size() == 3);
    assertTrue(artworkCollection.getFirst().getDescription().equals(ARTWORK1));
View Full Code Here


  @Test
  public void testArtworkCollectionAddFromFile() throws JitcaException{
    final String ARTWORK = "C:\\Nothing";
    IITArtworkCollection itArtworkCollection = new ITArtworkCollectionMock();
    TrackImpl track = TrackImpl.create(libraryMock, new ITTrackMock(itArtworkCollection));
    ArtworkCollectionImpl artworkCollection = new ArtworkCollectionImpl(track);
    assertTrue(artworkCollection.size() == 0);

    ArtworkImpl artwork = artworkCollection.add(new File(ARTWORK));
    artwork.setDescription(ARTWORK);
View Full Code Here

  @Test
  public void testArtworkCollectionAddFromArtwork() throws JitcaException{
    final String ARTWORK = "C:\\Nothing";
    IITArtworkCollection itArtworkCollection = new ITArtworkCollectionMock();
    TrackImpl track = TrackImpl.create(libraryMock, new ITTrackMock(itArtworkCollection));
    ArtworkCollectionImpl artworkCollection = new ArtworkCollectionImpl(track);
    assertTrue(artworkCollection.size() == 0);

    ArtworkImpl artwork1 = artworkCollection.add(new File(ARTWORK));
    artwork1.setDescription(ARTWORK);
View Full Code Here

    TrackCollectionImpl tracks = new TrackCollectionImpl(libraryMock, TrackCollectionImpl.DUPLICATES_NOT_ALLOWED);
    this.testForDuplicates(tracks, false);
  }

  private void testForDuplicates(TrackCollectionImpl tracks, boolean duplicatesAllowed) throws JitcaException {
    TrackImpl track1 = EasyMock.createMock(TrackImpl.class);
    TrackImpl track2 = EasyMock.createMock(TrackImpl.class);

    EasyMock.expect(track1.equals(track1)).andReturn(true).anyTimes();
    EasyMock.expect(track1.equals(track2)).andReturn(false).anyTimes();
    EasyMock.replay(track1);
    EasyMock.replay(track2);
View Full Code Here

    }

  }

  private TrackImpl createTrack(IITTrack itTrack) {
    TrackImpl track = TrackImpl.create(this, itTrack);
    this.addTrack(track);
    return track;
  }
View Full Code Here

    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);
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.impl.internal.track.TrackImpl

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.