~ubuntu-branches/ubuntu/utopic/libjaudiotagger-java/utopic

« back to all changes in this revision

Viewing changes to srctest/org/jaudiotagger/issues/Issue319Test.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-04-28 23:52:43 UTC
  • mfrom: (3.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110428235243-pzalvw6lncis3ukf
Tags: 2.0.3-1
* d/control: Drop Depends on default-jre per Debian Java Policy as its
  a library package.
* d/watch: Fix to directly monitor SVN tags.
* Switch to 3.0 (quilt) format.
* Bump Standards-Version to 3.9.2 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jaudiotagger.issues;
 
2
 
 
3
import org.jaudiotagger.AbstractTestCase;
 
4
import org.jaudiotagger.audio.AudioFileIO;
 
5
import org.jaudiotagger.audio.mp3.MP3File;
 
6
import org.jaudiotagger.tag.FieldKey;
 
7
import org.jaudiotagger.tag.KeyNotFoundException;
 
8
import org.jaudiotagger.tag.Tag;
 
9
 
 
10
import java.io.File;
 
11
 
 
12
/**
 
13
  Test tag Equality (specifically PartOfSet)
 
14
*/
 
15
public class Issue319Test extends AbstractTestCase
 
16
{
 
17
    /*
 
18
     * Test File Equality
 
19
     * @throws Exception
 
20
     */
 
21
    public void testTagEquality() throws Exception
 
22
    {
 
23
        File orig = new File("testdata", "test26.mp3");
 
24
        if (!orig.isFile())
 
25
        {
 
26
            System.err.println("Unable to test file - not available");
 
27
            return;
 
28
        }
 
29
 
 
30
        File file1 = new File("testdata", "test26.mp3");
 
31
 
 
32
 
 
33
        MP3File audioFile = (MP3File)AudioFileIO.read(file1);
 
34
        Tag tag = audioFile.getTag();
 
35
 
 
36
        FieldKey key = FieldKey.DISC_NO;
 
37
        try {
 
38
          String fieldValue = tag.getFirst(key);
 
39
            System.out.println("Fieldvalue is"+fieldValue);
 
40
        } catch (KeyNotFoundException e) {
 
41
          e.printStackTrace();
 
42
        }
 
43
 
 
44
 
 
45
 
 
46
    }
 
47
}
 
 
b'\\ No newline at end of file'