com.drew.imaging.jpeg.test
Class JpegSegmentReaderTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.drew.imaging.jpeg.test.JpegSegmentReaderTest
All Implemented Interfaces:
junit.framework.Test

public class JpegSegmentReaderTest
extends junit.framework.TestCase

Contains JUnit tests for the JpegSegmentReader class.


Constructor Summary
JpegSegmentReaderTest(String s)
           
 
Method Summary
 void testCreateWithFileAndReadMultipleSegments()
           
 void testCreateWithInputStream()
           
 void testCreateWithInputStreamAndReadMultipleSegments()
           
 void testGetSegmentCount()
           
 void testIsJpegWithJpegFile()
           
 void testIsJpegWithNonJpegFile()
           
 void testReadApp1Segment()
           
 void testReadDQTSegment()
           
 void testReadJpegByteArray()
           
 void testReadNonExistantSegmentInstance()
           
 void testReadSecondSegmentInstanace()
           
private  void validateMultipleSegmentRead(JpegSegmentReader reader)
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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

JpegSegmentReaderTest

public JpegSegmentReaderTest(String s)
Method Detail

testIsJpegWithJpegFile

public void testIsJpegWithJpegFile()
                            throws Exception
Throws:
Exception

testIsJpegWithNonJpegFile

public void testIsJpegWithNonJpegFile()
                               throws Exception
Throws:
Exception

testReadApp1Segment

public void testReadApp1Segment()
                         throws Exception
Throws:
Exception

testReadDQTSegment

public void testReadDQTSegment()
                        throws Exception
Throws:
Exception

testReadJpegByteArray

public void testReadJpegByteArray()
                           throws Exception
Throws:
Exception

testCreateWithInputStream

public void testCreateWithInputStream()
                               throws Exception
Throws:
Exception

testReadSecondSegmentInstanace

public void testReadSecondSegmentInstanace()
                                    throws Exception
Throws:
Exception

testReadNonExistantSegmentInstance

public void testReadNonExistantSegmentInstance()
                                        throws Exception
Throws:
Exception

testGetSegmentCount

public void testGetSegmentCount()
                         throws Exception
Throws:
Exception

testCreateWithFileAndReadMultipleSegments

public void testCreateWithFileAndReadMultipleSegments()
                                               throws Exception
Throws:
Exception

testCreateWithInputStreamAndReadMultipleSegments

public void testCreateWithInputStreamAndReadMultipleSegments()
                                                      throws Exception
Throws:
Exception

validateMultipleSegmentRead

private void validateMultipleSegmentRead(JpegSegmentReader reader)
                                  throws JpegProcessingException
Throws:
JpegProcessingException