Package com.jitcaforwin.extended.impl.collections

Examples of com.jitcaforwin.extended.impl.collections.ArtworkCollectionImpl


    ((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));
    assertTrue(artworkCollection.get(1).getDescription().equals(ARTWORK2));
    assertTrue(artworkCollection.get(2).getDescription().equals(ARTWORK3));
  }
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);
    assertTrue(artworkCollection.size() == 1);
    assertTrue(artworkCollection.get(0).getDescription().equals(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);
    assertTrue(artworkCollection.size() == 1);
    assertTrue(artworkCollection.get(0).getDescription().equals(ARTWORK));

    @SuppressWarnings("unused")
    ArtworkImpl artwork2 = artworkCollection.add(artwork1);
    assertTrue(artworkCollection.size() == 2);
    assertTrue(artworkCollection.get(1).getDescription().equals(ARTWORK));
  }
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public ArtworkCollectionImpl getArtworks() {
    if (this.artworks == null) {
      this.artworks = new ArtworkCollectionImpl(this);
    }
    return this.artworks;
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.extended.impl.collections.ArtworkCollectionImpl

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.