org.jaudiotagger.audio.asf.data
Class AbstractMetadataContainer<T extends MetadataContainer>

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jaudiotagger.AbstractTestCase
              extended by org.jaudiotagger.audio.asf.data.AbstractChunk<T>
                  extended by org.jaudiotagger.audio.asf.data.AbstractMetadataContainer<T>
Type Parameters:
T - The actual container implementation.
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ContentBrandingTest, ContentDescriptionTest, MetadataContainerTest

public abstract class AbstractMetadataContainer<T extends MetadataContainer>
extends AbstractChunk<T>

This class tests the correct implementation of MetadataContainer implementations.

Author:
Christian Laireiter

Constructor Summary
AbstractMetadataContainer()
           
 
Method Summary
protected abstract  MetadataDescriptor[] createSupportedDescriptors(T container)
          This method creates some or all supported descriptors for the given container.
Passed containers will be one of createTestContainers().
protected abstract  T[] createTestContainers()
          This method creates container instances which are to be tested.
 void testVariousDescriptorMethods()
          tests the following Methods.
createTestContainers() createSupportedDescriptors(MetadataContainer) MetadataContainer.isAddSupported(MetadataDescriptor) MetadataContainer.addDescriptor(MetadataDescriptor) MetadataContainer.hasDescriptor(String) MetadataContainer.getDescriptorCount() MetadataContainer.getDescriptors() MetadataContainer.getDescriptorsByName(String) MetadataContainer.containsDescriptor(MetadataDescriptor) MetadataContainer.removeDescriptorsByName(String)
 
Methods inherited from class org.jaudiotagger.audio.asf.data.AbstractChunk
createAString, createChunk, testBasicChunkMethods, testChunkCreation
 
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, tearDown, 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
 

Constructor Detail

AbstractMetadataContainer

public AbstractMetadataContainer()
Method Detail

createSupportedDescriptors

protected abstract MetadataDescriptor[] createSupportedDescriptors(T container)
This method creates some or all supported descriptors for the given container.
Passed containers will be one of createTestContainers().

Parameters:
container - the container to create test descriptors for.
Returns:
descriptors which are supported by the given container instance.

createTestContainers

protected abstract T[] createTestContainers()
This method creates container instances which are to be tested.

Returns:
all containers that may be tested by the implementation.

testVariousDescriptorMethods

public void testVariousDescriptorMethods()
tests the following Methods.



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