Search in sources :

Example 6 with TrackPlayCount

use of com.github.hakko.musiccabinet.domain.model.library.TrackPlayCount in project musiccabinet by hakko.

the class ScrobbledTracksParserTest method verifyLibraryTrack.

private void verifyLibraryTrack(ScrobbledTracksParser parser, int libraryTrackIndex, String artistName, String trackName, int playCount) {
    TrackPlayCount trackPlayCount = parser.getTrackPlayCounts().get(libraryTrackIndex);
    assertTrue(artistName.equals(trackPlayCount.getTrack().getArtist().getName()));
    assertTrue(trackName.equals(trackPlayCount.getTrack().getName()));
    assertEquals(playCount, trackPlayCount.getPlayCount());
}
Also used : TrackPlayCount(com.github.hakko.musiccabinet.domain.model.library.TrackPlayCount)

Aggregations

TrackPlayCount (com.github.hakko.musiccabinet.domain.model.library.TrackPlayCount)6 Test (org.junit.Test)3 ResourceUtil (com.github.hakko.musiccabinet.util.ResourceUtil)1 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 SqlParameter (org.springframework.jdbc.core.SqlParameter)1 BatchSqlUpdate (org.springframework.jdbc.object.BatchSqlUpdate)1