Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
add ID3v1Genres test
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.mpatric.mp3agic; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
public class ID3v1GenresTest { | ||
|
||
@Test | ||
public void returnsMinusOneForNonExistentGenre() throws Exception { | ||
assertEquals(-1, ID3v1Genres.matchGenreDescription("non existent")); | ||
} | ||
|
||
@Test | ||
public void returnsCorrectGenreIdForFirstExistentGenre() throws Exception { | ||
assertEquals(0, ID3v1Genres.matchGenreDescription("Blues")); | ||
} | ||
|
||
@Test | ||
public void returnsCorrectGenreIdForPolka() throws Exception { | ||
assertEquals(75, ID3v1Genres.matchGenreDescription("Polka")); | ||
} | ||
|
||
@Test | ||
public void returnsCorrectGenreIdForLastExistentGenre() throws Exception { | ||
assertEquals(147, ID3v1Genres.matchGenreDescription("Synthpop")); | ||
} | ||
|
||
@Test | ||
public void ignoresCase() throws Exception { | ||
assertEquals(137, ID3v1Genres.matchGenreDescription("heavy METAL")); | ||
} | ||
|
||
} |