Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add ID3v1Genres test
  • Loading branch information
hennr committed Feb 14, 2015
1 parent 653688e commit 63002a8
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/test/java/com/mpatric/mp3agic/ID3v1GenresTest.java
@@ -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"));
}

}

0 comments on commit 63002a8

Please sign in to comment.