Package gov.nih.mipav.model.file
Class MetadataExtractorTest.RandomAccessTestBase
- java.lang.Object
-
- gov.nih.mipav.model.file.MetadataExtractorTest.RandomAccessTestBase
-
- Direct Known Subclasses:
MetadataExtractorTest.ByteArrayReaderTest
,MetadataExtractorTest.RandomAccessFileReaderTest
,MetadataExtractorTest.RandomAccessStreamReaderTest
- Enclosing class:
- MetadataExtractorTest
public abstract class MetadataExtractorTest.RandomAccessTestBase extends java.lang.Object
Base class for testing implementations ofMetadataExtractor.RandomAccessReader
.- Author:
- Drew Noakes https://drewnoakes.com
-
-
Constructor Summary
Constructors Constructor Description RandomAccessTestBase()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract MetadataExtractor.RandomAccessReader
createReader(byte[] bytes)
void
testDefaultEndianness()
void
testGetBytesEOF()
void
testGetFloat32()
void
testGetFloat64()
void
testGetInt16()
void
testGetInt32()
void
testGetInt32_OutOfBounds()
void
testGetInt64()
void
testGetInt64_OutOfBounds()
void
testGetInt8()
void
testGetInt8EOF()
void
testGetNullTerminatedString()
void
testGetString()
void
testGetUInt16()
void
testGetUInt16_OutOfBounds()
void
testGetUInt32()
void
testGetUInt8()
void
testGetUInt8_OutOfBounds()
void
testIndexPlusCountExceedsIntMaxValue()
void
testOverflowBoundsCalculation()
-
-
-
Method Detail
-
createReader
protected abstract MetadataExtractor.RandomAccessReader createReader(byte[] bytes)
-
testDefaultEndianness
public void testDefaultEndianness()
-
testGetInt8
public void testGetInt8() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetUInt8
public void testGetUInt8() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetUInt8_OutOfBounds
public void testGetUInt8_OutOfBounds()
-
testGetInt16
public void testGetInt16() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetUInt16
public void testGetUInt16() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetUInt16_OutOfBounds
public void testGetUInt16_OutOfBounds()
-
testGetInt32
public void testGetInt32() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetUInt32
public void testGetUInt32() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetInt32_OutOfBounds
public void testGetInt32_OutOfBounds()
-
testGetInt64
public void testGetInt64() throws java.io.IOException
- Throws:
java.io.IOException
-
testGetInt64_OutOfBounds
public void testGetInt64_OutOfBounds() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetFloat32
public void testGetFloat32() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetFloat64
public void testGetFloat64() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetNullTerminatedString
public void testGetNullTerminatedString() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetString
public void testGetString() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testIndexPlusCountExceedsIntMaxValue
public void testIndexPlusCountExceedsIntMaxValue()
-
testOverflowBoundsCalculation
public void testOverflowBoundsCalculation()
-
testGetBytesEOF
public void testGetBytesEOF() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testGetInt8EOF
public void testGetInt8EOF() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-