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

« back to all changes in this revision

Viewing changes to srctest/org/jaudiotagger/tag/id3/framebody/FrameBodyTSOATest.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.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 TSOAFrameBody
9
 
 */
10
 
public class FrameBodyTSOATest extends AbstractTestCase
11
 
{
12
 
    public static final String ALBUM_SORT = "albumsort";
13
 
 
14
 
    public static FrameBodyTSOA getInitialisedBody()
15
 
    {
16
 
        FrameBodyTSOA fb = new FrameBodyTSOA();
17
 
        fb.setText(FrameBodyTSOATest.ALBUM_SORT);
18
 
        return fb;
19
 
    }
20
 
 
21
 
    public void testCreateFrameBody()
22
 
    {
23
 
        Exception exceptionCaught = null;
24
 
        FrameBodyTSOA fb = null;
25
 
        try
26
 
        {
27
 
            fb = new FrameBodyTSOA(TextEncoding.ISO_8859_1, FrameBodyTSOATest.ALBUM_SORT);
28
 
        }
29
 
        catch (Exception e)
30
 
        {
31
 
            exceptionCaught = e;
32
 
        }
33
 
 
34
 
        assertNull(exceptionCaught);
35
 
        assertEquals(ID3v24Frames.FRAME_ID_ALBUM_SORT_ORDER, fb.getIdentifier());
36
 
        assertEquals(TextEncoding.ISO_8859_1, fb.getTextEncoding());
37
 
        assertEquals(FrameBodyTSOATest.ALBUM_SORT, fb.getText());
38
 
 
39
 
    }
40
 
 
41
 
    public void testCreateFrameBodyEmptyConstructor()
42
 
    {
43
 
        Exception exceptionCaught = null;
44
 
        FrameBodyTSOA fb = null;
45
 
        try
46
 
        {
47
 
            fb = new FrameBodyTSOA();
48
 
            fb.setText(FrameBodyTSOATest.ALBUM_SORT);
49
 
        }
50
 
        catch (Exception e)
51
 
        {
52
 
            exceptionCaught = e;
53
 
        }
54
 
 
55
 
        assertNull(exceptionCaught);
56
 
        assertEquals(ID3v24Frames.FRAME_ID_ALBUM_SORT_ORDER, fb.getIdentifier());
57
 
        assertEquals(TextEncoding.ISO_8859_1, fb.getTextEncoding());
58
 
        assertEquals(FrameBodyTSOATest.ALBUM_SORT, fb.getText());
59
 
 
60
 
    }
61
 
 
62
 
 
63
 
}
 
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 TSOAFrameBody
 
9
 */
 
10
public class FrameBodyTSOATest extends AbstractTestCase
 
11
{
 
12
    public static final String ALBUM_SORT = "albumsort";
 
13
 
 
14
    public static FrameBodyTSOA getInitialisedBody()
 
15
    {
 
16
        FrameBodyTSOA fb = new FrameBodyTSOA();
 
17
        fb.setText(FrameBodyTSOATest.ALBUM_SORT);
 
18
        return fb;
 
19
    }
 
20
 
 
21
    public void testCreateFrameBody()
 
22
    {
 
23
        Exception exceptionCaught = null;
 
24
        FrameBodyTSOA fb = null;
 
25
        try
 
26
        {
 
27
            fb = new FrameBodyTSOA(TextEncoding.ISO_8859_1, FrameBodyTSOATest.ALBUM_SORT);
 
28
        }
 
29
        catch (Exception e)
 
30
        {
 
31
            exceptionCaught = e;
 
32
        }
 
33
 
 
34
        assertNull(exceptionCaught);
 
35
        assertEquals(ID3v24Frames.FRAME_ID_ALBUM_SORT_ORDER, fb.getIdentifier());
 
36
        assertEquals(TextEncoding.ISO_8859_1, fb.getTextEncoding());
 
37
        assertEquals(FrameBodyTSOATest.ALBUM_SORT, fb.getText());
 
38
 
 
39
    }
 
40
 
 
41
    public void testCreateFrameBodyEmptyConstructor()
 
42
    {
 
43
        Exception exceptionCaught = null;
 
44
        FrameBodyTSOA fb = null;
 
45
        try
 
46
        {
 
47
            fb = new FrameBodyTSOA();
 
48
            fb.setText(FrameBodyTSOATest.ALBUM_SORT);
 
49
        }
 
50
        catch (Exception e)
 
51
        {
 
52
            exceptionCaught = e;
 
53
        }
 
54
 
 
55
        assertNull(exceptionCaught);
 
56
        assertEquals(ID3v24Frames.FRAME_ID_ALBUM_SORT_ORDER, fb.getIdentifier());
 
57
        assertEquals(TextEncoding.ISO_8859_1, fb.getTextEncoding());
 
58
        assertEquals(FrameBodyTSOATest.ALBUM_SORT, fb.getText());
 
59
 
 
60
    }
 
61
 
 
62
 
 
63
}