org.jaudiotagger.audio.asf.data
Class AbstractChunk<T extends Chunk>

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>
Type Parameters:
T - The chunk class under test.
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractMetadataContainer, ChunkContainerTest, ChunkTest, LanguageListTest

public abstract class AbstractChunk<T extends Chunk>
extends AbstractTestCase

Specifies methods for creating Chunk objects.

Author:
Christian Laireiter

Constructor Summary
AbstractChunk()
           
 
Method Summary
static String createAString(long charAmount)
          Helper method for creating string with charAmount of 'a's.
protected abstract  T createChunk(long pos, BigInteger size)
          Creates a chunk instance.
private  Exception failOn(long pos, BigInteger size)
          Invokes createChunk(long, BigInteger) and returns possible occurred exceptions.
 void testBasicChunkMethods()
          Tests the correctness of various methods from Chunk directly after construction.
 void testChunkCreation()
          Tests chunk creation by using invalid and valid creation arguments on createChunk(long, BigInteger).
 
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

AbstractChunk

public AbstractChunk()
Method Detail

createAString

public static String createAString(long charAmount)
Helper method for creating string with charAmount of 'a's.

Parameters:
charAmount - amount of characters to include in result.
Returns:
see description.

createChunk

protected abstract T createChunk(long pos,
                                 BigInteger size)
Creates a chunk instance.

Parameters:
pos - position of chunk.
size - size of chunk
Returns:
Chunk instance.

failOn

private Exception failOn(long pos,
                         BigInteger size)
Invokes createChunk(long, BigInteger) and returns possible occurred exceptions.

Parameters:
pos - position
size - size
Returns:
possibly occurred exception

testBasicChunkMethods

public void testBasicChunkMethods()
Tests the correctness of various methods from Chunk directly after construction.


testChunkCreation

public void testChunkCreation()
Tests chunk creation by using invalid and valid creation arguments on createChunk(long, BigInteger).



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