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

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


   * @param name
   *            Name of the genre.
   * @return The genre.
   */
  private Genre addGenre(String name) {
    Genre newGenre = new GenreImpl(name, this.source);
    this.genres.put(name, newGenre);
    return newGenre;
  }
View Full Code Here


    EasyMock.replay(trackCollectionMock);

    ArtistImpl testArtist = (ArtistImpl) ArtistImpl.create("Test-Artist-Name", libraryMock);
    ArtistImpl testComposer = (ArtistImpl) ArtistImpl.create("Test-Composer-Name", libraryMock);
    AlbumImpl testAlbum = new AlbumImpl("Test-Album-Name", testArtist, libraryMock);
    GenreImpl testGenre = new GenreImpl("Test-Genre", libraryMock);
    EasyMock.reset(libraryMock);
    EasyMock.expect(libraryMock.isLazy()).andReturn(false).anyTimes();
    EasyMock.expect(libraryMock.getAlbum("Test-Album-Name", testArtist)).andReturn(testAlbum).anyTimes();
    EasyMock.expect((libraryMock.getArtist("Test-Artist-Name"))).andReturn(testArtist).anyTimes();
    EasyMock.expect((libraryMock.getArtist("Test-Composer-Name"))).andReturn(testComposer).anyTimes();
View Full Code Here

    EasyMock.expect(sourceMock.isLazy()).andReturn(true).anyTimes();
    EasyMock.expect(sourceMock.getTrackFactory()).andReturn(null).anyTimes();
    EasyMock.replay(sourceMock);

    Genre id3TagGenre = new GenreImpl("Pop", sourceMock);
    Genre nonId3TagGenre = new GenreImpl("Non-ID3-Genre-Pop", sourceMock);

    assertTrue(id3TagGenre.isId3TagGenre());
    assertFalse(nonId3TagGenre.isId3TagGenre());
  }
View Full Code Here

    EasyMock.expect(sourceMock.isLazy()).andReturn(true).anyTimes();
    EasyMock.expect(sourceMock.getTrackFactory()).andReturn(null).anyTimes();
    EasyMock.replay(sourceMock);

    Genre basicId3TagGenre = new GenreImpl("Pop", sourceMock);
    Genre nonBasicId3TagGenre = new GenreImpl("Celtic", sourceMock);

    assertTrue(basicId3TagGenre.isId3TagGenre());
    assertTrue(nonBasicId3TagGenre.isId3TagGenre());
    assertTrue(basicId3TagGenre.isBasicId3TagGenre());
    assertFalse(nonBasicId3TagGenre.isBasicId3TagGenre());
  }
View Full Code Here

    EasyMock.expect(sourceMock.isLazy()).andReturn(true).anyTimes();
    EasyMock.expect(sourceMock.getTrackFactory()).andReturn(null).anyTimes();
    EasyMock.replay(sourceMock);

    Genre winampGenre = new GenreImpl("Celtic", sourceMock);
    Genre nonWinampGenre = new GenreImpl("Pop", sourceMock);

    assertTrue(winampGenre.isId3TagGenre());
    assertTrue(nonWinampGenre.isId3TagGenre());
    assertTrue(winampGenre.isWinampExtensionId3TagGenre());
    assertFalse(nonWinampGenre.isWinampExtensionId3TagGenre());
  }
View Full Code Here

    EasyMock.expect(sourceMock.isLazy()).andReturn(true).anyTimes();
    EasyMock.expect(sourceMock.getTrackFactory()).andReturn(null).anyTimes();
    EasyMock.replay(sourceMock);
   
    assertEquals(0, new GenreImpl("Blues", sourceMock).getId());
    assertEquals(13, new GenreImpl("Pop", sourceMock).getId());
    assertEquals(Genre.UNKOWN_GENRE, new GenreImpl("Unkown Genre", sourceMock).getId());
    // testing all genres is not necessary, because this is tested for ID3GenreFactory
  }
View Full Code Here

TOP

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

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.