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

« back to all changes in this revision

Viewing changes to srctest/org/jaudiotagger/tag/id3/framebody/FrameBodyTSOPTest.java

  • Committer: Bazaar Package Importer
  • Author(s): Varun Hiremath, Damien Raude-Morvan, Varun Hiremath
  • Date: 2009-04-01 19:17:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090401191756-bygniim270guy7o1
Tags: 1.0.9-1
[ Damien Raude-Morvan ]
* New upstream release
* debian/watch: Use java.net repository (which contains new releases!)
* debian/control:
  - Build-Depends on default-jdk-builddep
  - Bump Standards-Version to 3.8.1 (no changes needed)
  - Change section to "java"
* debian/rules: use default-java as JAVA_HOME
* debina/orig-tar.{sh|excludes}: strip audio and others binary files from ZIP
* debian/build.xml:
  - compile with "nowarn" to keep build log readable
  - exclude LogFormatter from build (use com.sun classes)
* debian/ant.properties: new source directory is "src" in orig.tar.gz
* Add myself as Uploaders

[ Varun Hiremath ]
* Accept changes made by Damien Raude-Morvan (Closes: #522130)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package org.jaudiotagger.tag.id3.framebody;
 
2
 
 
3
import org.jaudiotagger.AbstractTestCase;
 
4
import org.jaudiotagger.tag.id3.ID3v24Frames;
 
5
import org.jaudiotagger.tag.id3.valuepair.TextEncoding;
 
6
 
 
7
/**
 
8
 * Test TSOTFrameBody
 
9
 */
 
10
public class FrameBodyTSOPTest extends AbstractTestCase
 
11
{
 
12
    public static final String ARTIST_SORT = "artistsort";
 
13
 
 
14
    public static FrameBodyTSOP getInitialisedBody()
 
15
    {
 
16
        FrameBodyTSOP fb = new FrameBodyTSOP();
 
17
        fb.setText(FrameBodyTSOPTest.ARTIST_SORT);
 
18
        return fb;
 
19
    }
 
20
 
 
21
    public void testCreateFrameBody()
 
22
    {
 
23
        Exception exceptionCaught = null;
 
24
        FrameBodyTSOP fb = null;
 
25
        try
 
26
        {
 
27
            fb = new FrameBodyTSOP(TextEncoding.ISO_8859_1, FrameBodyTSOPTest.ARTIST_SORT);
 
28
        }
 
29
        catch (Exception e)
 
30
        {
 
31
            exceptionCaught = e;
 
32
        }
 
33
 
 
34
        assertNull(exceptionCaught);
 
35
        assertEquals(ID3v24Frames.FRAME_ID_ARTIST_SORT_ORDER, fb.getIdentifier());
 
36
        assertEquals(TextEncoding.ISO_8859_1, fb.getTextEncoding());
 
37
        assertEquals(FrameBodyTSOPTest.ARTIST_SORT, fb.getText());
 
38
 
 
39
    }
 
40
 
 
41
    public void testCreateFrameBodyEmptyConstructor()
 
42
    {
 
43
        Exception exceptionCaught = null;
 
44
        FrameBodyTSOP fb = null;
 
45
        try
 
46
        {
 
47
            fb = new FrameBodyTSOP();
 
48
            fb.setText(FrameBodyTSOPTest.ARTIST_SORT);
 
49
        }
 
50
        catch (Exception e)
 
51
        {
 
52
            exceptionCaught = e;
 
53
        }
 
54
 
 
55
        assertNull(exceptionCaught);
 
56
        assertEquals(ID3v24Frames.FRAME_ID_ARTIST_SORT_ORDER, fb.getIdentifier());
 
57
        assertEquals(TextEncoding.ISO_8859_1, fb.getTextEncoding());
 
58
        assertEquals(FrameBodyTSOPTest.ARTIST_SORT, fb.getText());
 
59
 
 
60
    }
 
61
 
 
62
 
 
63
}