org.jaudiotagger.tag.wma
Class WmaDescriptionLocationTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jaudiotagger.tag.wma.WmaTestCase
              extended by org.jaudiotagger.tag.wma.WmaDescriptionLocationTest
All Implemented Interfaces:
junit.framework.Test

public class WmaDescriptionLocationTest
extends WmaTestCase

This testcase tests the ability to read the content description and extended content description from the ASF header object and the ASF header extension object.

Author:
Christian Laireiter

Field Summary
static String TEST_FILE
          Test file to use as source.
private  AsfTag testTag
          Will hold a tag instance for writing some values.
 
Constructor Summary
WmaDescriptionLocationTest()
          Creates an instance.
 
Method Summary
private  void applyTag(File testFile, boolean hcd, boolean hecd)
          Applies testTag to the given audio file, and allows to specify at which location the content description and extended content description are to be added.
private  void checkExcpectations(File testFile, boolean hcd, boolean hecd, boolean ehcd, boolean ehecd)
          Tests whether the audio file contains artist and variable bitrate as specified in the constructor, and if a content description object as well as an extended content description is available.
 void testChunkLocations()
          Tests the locations of the metadata descriptor object and the extended metadata descriptor object, upon some deep ASF manipulations.
 
Methods inherited from class org.jaudiotagger.tag.wma.WmaTestCase
getAudioFile, getTag, prepareTestFile, setUp, tearDown
 
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

TEST_FILE

public static final String TEST_FILE
Test file to use as source.

See Also:
Constant Field Values

testTag

private final AsfTag testTag
Will hold a tag instance for writing some values.

Constructor Detail

WmaDescriptionLocationTest

public WmaDescriptionLocationTest()
                           throws Exception
Creates an instance.

Throws:
Exception
Method Detail

applyTag

private void applyTag(File testFile,
                      boolean hcd,
                      boolean hecd)
               throws Exception
Applies testTag to the given audio file, and allows to specify at which location the content description and extended content description are to be added.

Parameters:
testFile - The file to work with.
hcd - true if the content description should be placed into the header object. if false it will be placed in the header extension object.
hecd - true if the extended content description should be placed into the header object. if false it will be placed in the header extension object.
Throws:
Exception - on I/O Errors.

checkExcpectations

private void checkExcpectations(File testFile,
                                boolean hcd,
                                boolean hecd,
                                boolean ehcd,
                                boolean ehecd)
                         throws Exception
Tests whether the audio file contains artist and variable bitrate as specified in the constructor, and if a content description object as well as an extended content description is available.

Parameters:
testFile - file to test
hcd - true if a content description is expected in the ASF header.
hecd - true if an extended content description is expected in the ASF header.
ehcd - true if a content description is expected in the ASF header extension.
ehecd - true if an extended content description is expected in the ASF header extension.
Throws:
Exception - on I/O Errors

testChunkLocations

public void testChunkLocations()
                        throws Exception
Tests the locations of the metadata descriptor object and the extended metadata descriptor object, upon some deep ASF manipulations.

Throws:
Exception - On I/O Errors


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