org.jaudiotagger
Class AbstractTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.jaudiotagger.AbstractTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractChunk, CompressedTest, DeprecatedFrameTest, FileClosingTest, FrameBodyAPICTest, FrameBodyDeprecatedTest, FrameBodyPCNTTest, FrameBodyPICTest, FrameBodyPOPMTest, FrameBodyRVA2Test, FrameBodyRVADTest, FrameBodyTCMPTest, FrameBodyTDRCTest, FrameBodyTIPLTest, FrameBodyTMOOTest, FrameBodyTPE1Test, FrameBodyTPOSTest, FrameBodyTRCKTest, FrameBodyTSO2Test, FrameBodyTSOATest, FrameBodyTSOCTest, FrameBodyTSOPTest, FrameBodyTSOTTest, FrameBodyTXXXTest, FrameBodyUFIDTest, FrameBodyUSLTTest, FrameBodyWXXXTest, FrameBodyXSOATest, FrameBodyXSOPTest, FrameBodyXSOTTest, FrameCOMMTest, FrameETCOTest, FramePCNTTest, FramePICAndAPICTest, FramePOPMTest, FrameRVADAndRVA2Test, FrameSYLTTest, FrameTCMPTest, FrameTDRCTest, FrameTIPLTest, FrameTLANTest, FrameTMOOTest, FrameTOPETest, FrameTRCKTest, FrameTSO2Test, FrameTSOATest, FrameTSOCTest, FrameTSOPTest, FrameTSOTTest, FrameTXXXTest, FrameULSTTest, FrameWOARTest, FrameWXXXTest, GenreTest, GUIDTest, ISOCountryTest, Issue100Test, Issue178Test, Issue185Test, Issue220Test, Issue221Test, Issue222Test, Issue224Test, Issue225Test, Issue232Test, Issue233Test, Issue239Test, Issue240Test, Issue241Test, Issue242Test, Issue245Test, Issue248Test, Issue249Test, Issue255Test, Issue257Test, Issue258Test, Issue260Test, Issue261Test, Issue263Test, Issue265Test, Issue268Test, Issue269Test, Issue270Test, Issue271Test, Issue273Test, Issue274Test, Issue277Test, Issue279Test, Issue282Test, Issue283Test, Issue284Test, Issue285Test, Issue289Test, Issue290Test, Issue291Test, Issue292Test, Issue294Test, Issue307Test, Issue308Test, Issue309Test, ItunesTest, RealReadTagTest, SyncSafeIntegerTest, UnsynchronizationTest, VorbisImageTest, VorbisReadTagTest, VorbisWriteTagTest, WavSimpleTest, WmaSimpleTest

public abstract class AbstractTestCase
extends junit.framework.TestCase


Field Summary
private static EnumMap<ErrorMessage,Pattern> ERROR_PATTERNS
          Stores a Pattern for each ErrorMessage.
Place holders like "{<number>}" will be replaced with ".*".
 
Constructor Summary
AbstractTestCase()
           
 
Method Summary
private static boolean append(File fromFile1, File fromFile2, File toFile)
           
 void assertErrorMessage(ErrorMessage expected, String actual)
          This method asserts that the given actual message is constructed with the expected message string.

static boolean copy(File fromFile, File toFile)
          Copy a File
static File copyAudioToTmp(String fileName)
          Copy audiofile to processing dir ready for use in test
static File copyAudioToTmp(String fileName, File newFileName)
          Copy audiofile to processing dir ready for use in test, use this if using same file in multiple tests because with junit multithreading can have problemsa otherwise
static File copyAudioToTmp(String tagfile, String fileName)
          Prepends file with tag file in order to create an mp3 with a valid id3
 void 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
 

Field Detail

ERROR_PATTERNS

private static final EnumMap<ErrorMessage,Pattern> ERROR_PATTERNS
Stores a Pattern for each ErrorMessage.
Place holders like "{<number>}" will be replaced with ".*".

Constructor Detail

AbstractTestCase

public AbstractTestCase()
Method Detail

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase

append

private static boolean append(File fromFile1,
                              File fromFile2,
                              File toFile)

copy

public static boolean copy(File fromFile,
                           File toFile)
Copy a File

Parameters:
fromFile - The existing File
toFile - The new File
Returns:
true if and only if the renaming succeeded; false otherwise

copyAudioToTmp

public static File copyAudioToTmp(String fileName)
Copy audiofile to processing dir ready for use in test

Parameters:
fileName -
Returns:

copyAudioToTmp

public static File copyAudioToTmp(String fileName,
                                  File newFileName)
Copy audiofile to processing dir ready for use in test, use this if using same file in multiple tests because with junit multithreading can have problemsa otherwise

Parameters:
fileName -
Returns:

copyAudioToTmp

public static File copyAudioToTmp(String tagfile,
                                  String fileName)
Prepends file with tag file in order to create an mp3 with a valid id3

Parameters:
tagfile -
fileName -
Returns:

assertErrorMessage

public void assertErrorMessage(ErrorMessage expected,
                               String actual)
This method asserts that the given actual message is constructed with the expected message string.

Parameters:
expected - the expected message source.
actual - the message to compare against.


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