org.jaudiotagger.tag.id3
Class ItunesTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jaudiotagger.AbstractTestCase
              extended by org.jaudiotagger.tag.id3.ItunesTest
All Implemented Interfaces:
junit.framework.Test

public class ItunesTest
extends AbstractTestCase

Test Itunes problems


Field Summary
private static String EMPTY_VALUE
           
private static int FRAME_SIZE
           
private static int FRAME_SIZE2
           
private static String SECOND_VALUE
           
private static int STRING_LENGTH_WITH_NULL
           
private static int STRING_LENGTH_WITHOUT_NULL
           
private static int TERMINATOR_LENGTH
           
 
Constructor Summary
ItunesTest()
           
 
Method Summary
protected  void tearDown()
           
 void testCanFindStartOfMp3AudioWithinUTF16LETag()
          Check skips over tag to read mp3 audio
 void testCanIgnoreSpuriousNullCharacters()
          test can read string with spurious null at end, and can retrieve string without this if we want to.
 void testCanReadEmptyString()
          Check can handle empty value when splitting strings into a list
 void testv24TagWithlargeSyncSafeFrameAndNoPadding()
          Because last frame is large it has to check that size is unsynced, because no padding code have to be careful not to have buffer underflow exception
 void testv24TagWithNonSyncSafeFrame()
          This tests that we work out that the frame is not unsynced and read the frame size as a normal integer using an integral algorithm
 void testv24TagWithNonSyncSafeFrame2()
          This tests that we work out that the frame is not unsynced because its highest order bit size is set and read the frame size as a normal integer using an integral algorithm
 void testv24TagWithNonSyncSafeFrame3()
          This tests that we work out that the frame is not unsynced because frame only matches to next frame identifier when not unsynced ( it is the USLT frame that is bering tested in this case, we only get to APIC if read USLT frame ok)
 void testv24TagWithSyncSafeFrame()
          This tests that we work out that the frame is unsynced and read the frame size correctly and convert to intger this is what most (non-itunes applications do)
 
Methods inherited from class org.jaudiotagger.AbstractTestCase
assertErrorMessage, copy, copyAudioToTmp, copyAudioToTmp, copyAudioToTmp, setUp
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FRAME_SIZE

private static final int FRAME_SIZE
See Also:
Constant Field Values

FRAME_SIZE2

private static final int FRAME_SIZE2
See Also:
Constant Field Values

STRING_LENGTH_WITH_NULL

private static final int STRING_LENGTH_WITH_NULL
See Also:
Constant Field Values

STRING_LENGTH_WITHOUT_NULL

private static final int STRING_LENGTH_WITHOUT_NULL
See Also:
Constant Field Values

TERMINATOR_LENGTH

private static final int TERMINATOR_LENGTH
See Also:
Constant Field Values

SECOND_VALUE

private static final String SECOND_VALUE
See Also:
Constant Field Values

EMPTY_VALUE

private static final String EMPTY_VALUE
See Also:
Constant Field Values
Constructor Detail

ItunesTest

public ItunesTest()
Method Detail

tearDown

protected void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testv24TagWithNonSyncSafeFrame

public void testv24TagWithNonSyncSafeFrame()
                                    throws Exception
This tests that we work out that the frame is not unsynced and read the frame size as a normal integer using an integral algorithm

Throws:
Exception

testv24TagWithNonSyncSafeFrame2

public void testv24TagWithNonSyncSafeFrame2()
                                     throws Exception
This tests that we work out that the frame is not unsynced because its highest order bit size is set and read the frame size as a normal integer using an integral algorithm

Throws:
Exception

testv24TagWithNonSyncSafeFrame3

public void testv24TagWithNonSyncSafeFrame3()
                                     throws Exception
This tests that we work out that the frame is not unsynced because frame only matches to next frame identifier when not unsynced ( it is the USLT frame that is bering tested in this case, we only get to APIC if read USLT frame ok)

Throws:
Exception

testv24TagWithSyncSafeFrame

public void testv24TagWithSyncSafeFrame()
                                 throws Exception
This tests that we work out that the frame is unsynced and read the frame size correctly and convert to intger this is what most (non-itunes applications do)

Throws:
Exception

testCanIgnoreSpuriousNullCharacters

public void testCanIgnoreSpuriousNullCharacters()
                                         throws Exception
test can read string with spurious null at end, and can retrieve string without this if we want to. Can then write to file without null if options set correctly, can add multiple values

Throws:
Exception

testCanReadEmptyString

public void testCanReadEmptyString()
                            throws Exception
Check can handle empty value when splitting strings into a list

Throws:
Exception

testCanFindStartOfMp3AudioWithinUTF16LETag

public void testCanFindStartOfMp3AudioWithinUTF16LETag()
                                                throws Exception
Check skips over tag to read mp3 audio

Throws:
Exception

testv24TagWithlargeSyncSafeFrameAndNoPadding

public void testv24TagWithlargeSyncSafeFrameAndNoPadding()
                                                  throws Exception
Because last frame is large it has to check that size is unsynced, because no padding code have to be careful not to have buffer underflow exception

Throws:
Exception


Copyright © 2005-2009 java.net. All Rights Reserved.