ID3v1_1 copyTag = new ID3v1_1(tag);
assertEquals(copyTag, tag);
}
public void testLyrics3v1() {
Lyrics3v1 tag = new Lyrics3v1();
try {
tag.getSongTitle();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.getLeadArtist();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.getAlbumTitle();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.getYearReleased();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.getSongComment();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.getSongGenre();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.getTrackNumberOnAlbum();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
assertEquals("", tag.getSongLyric());
try {
tag.getAuthorComposer();
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
tag = new Lyrics3v1();
try {
tag.setSongTitle(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.setLeadArtist(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.setAlbumTitle(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.setYearReleased(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.setSongComment(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.setSongGenre(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
try {
tag.setTrackNumberOnAlbum(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
tag.setSongLyric(songLyric);
try {
tag.setAuthorComposer(null);
fail("Did not throw UnsupportedOperationException");
} catch (UnsupportedOperationException ex) {
}
assertEquals(songLyric, tag.getSongLyric());
// run again because it's a different case
tag.setSongLyric(songLyric);
assertEquals(songLyric, tag.getSongLyric());
ID3v2_4 convertTag = new ID3v2_4(tag);
Lyrics3v1 newTag = new Lyrics3v1(convertTag);
assertEquals(tag, newTag);
assertEquals(newTag.getSongLyric(), tag.getSongLyric());
Lyrics3v1 copyTag = new Lyrics3v1(tag);
assertEquals(copyTag, tag);
}