test.unittests
Class H5CompoundDSTest

java.lang.Object
  extended by TestCase
      extended by test.unittests.H5CompoundDSTest

public class H5CompoundDSTest
extends TestCase

TestCase for H5CompoundDS.

This class tests all the public methods in H5CompoundDS class.

The test file contains the following objects.

 
        /dataset_byte            Dataset {50, 10}
        /dataset_comp            Dataset {50, 10}
        /dataset_enum            Dataset {50, 10}
        /dataset_float           Dataset {50, 10}
        /dataset_image           Dataset {50, 10}
        /dataset_int             Dataset {50, 10}
        /dataset_str             Dataset {50, 10}
        /g0                      Group
        /g0/dataset_comp         Dataset {50, 10}
        /g0/dataset_int          Dataset {50, 10}
        /g0/datatype_float       Type
        /g0/datatype_int         Type
        /g0/datatype_str         Type
        /g0/g00                  Group
        /g0/g00/dataset_float    Dataset {50, 10}
        /g0_attr                 Group

 

We use the following template to test all the methods:

What to test:


Constructor Summary
H5CompoundDSTest(java.lang.String arg0)
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testClear()
          Test method for H5CompoundDS.clear().
 void testClose()
          Test method for H5CompoundDS.close(int).
 void testCreateStringGroupLongArrayLongArrayLongArrayIntStringArrayDatatypeArrayIntArrayIntArrayArrayObject()
          Test method for H5CompoundDS.create(java.lang.String, ncsa.hdf.object.Group, long[], long[], long[], int, java.lang.String[], ncsa.hdf.object.Datatype[], int[], int[][], java.lang.Object).
 void testCreateStringGroupLongArrayStringArrayDatatypeArrayIntArrayIntArrayArrayObject()
          Test method for H5CompoundDS.create(java.lang.String, ncsa.hdf.object.Group, long[], java.lang.String[], ncsa.hdf.object.Datatype[], int[], int[][], java.lang.Object).
 void testCreateStringGroupLongArrayStringArrayDatatypeArrayIntArrayObject()
          Test method for H5CompoundDS.create(java.lang.String, ncsa.hdf.object.Group, long[], java.lang.String[], ncsa.hdf.object.Datatype[], int[], java.lang.Object).
 void testGetDatatype()
          Test method for H5CompoundDS.getDatatype().
 void testGetMetadata()
          Test method for H5CompoundDS.getMetadata().
 void testGetSize()
          Test method for H5CompoundDS.getSize(int).
 void testH5CompoundDSFileFormatStringString()
          Test method for H5CompoundDS.H5CompoundDS(ncsa.hdf.object.FileFormat, java.lang.String, java.lang.String).
 void testH5CompoundDSFileFormatStringStringLongArray()
          Test method for H5CompoundDS.H5CompoundDS(ncsa.hdf.object.FileFormat, java.lang.String, java.lang.String, long[]).
 void testInit()
          Test method for H5CompoundDS.init().
 void testIsString()
          Test method for H5CompoundDS.isString(int).
 void testOpen()
          Test method for H5CompoundDS.open().
 void testRead()
          Test method for H5CompoundDS.read().
 void testReadByField()
          Test method for H5CompoundDS.read().
 void testReadByRow()
          Test method for H5CompoundDS.read().
 void testReadBytes()
          Test method for H5CompoundDS.readBytes().
 void testRemoveMetadata()
          Test method for H5CompoundDS.removeMetadata(java.lang.Object).
 void testSetName()
          Test method for H5CompoundDS.setName(java.lang.String).
 void testWriteByField()
          Test method for H5CompoundDS.write(java.lang.Object).
 void testWriteByRow()
          Test method for H5CompoundDS.write(java.lang.Object).
 void testWriteMetadata()
          Test method for H5CompoundDS.writeMetadata(java.lang.Object).
 void testWriteObject()
          Test method for H5CompoundDS.write(java.lang.Object).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

H5CompoundDSTest

public H5CompoundDSTest(java.lang.String arg0)
Parameters:
arg0 -
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testSetName

public final void testSetName()
Test method for H5CompoundDS.setName(java.lang.String).

What to test:


testOpen

public final void testOpen()
Test method for H5CompoundDS.open().

What to test:


testClose

public final void testClose()
Test method for H5CompoundDS.close(int).

What to test:


testClear

public final void testClear()
Test method for H5CompoundDS.clear().

What to test:


testInit

public final void testInit()
Test method for H5CompoundDS.init().

What to test:


testRead

public final void testRead()
Test method for H5CompoundDS.read().

What to test:


testReadByRow

public final void testReadByRow()
Test method for H5CompoundDS.read().

What to test:


testReadByField

public final void testReadByField()
Test method for H5CompoundDS.read().

What to test:


testReadBytes

public final void testReadBytes()
Test method for H5CompoundDS.readBytes().

What to test:


testWriteObject

public final void testWriteObject()
Test method for H5CompoundDS.write(java.lang.Object).

What to test:


testWriteByRow

public final void testWriteByRow()
Test method for H5CompoundDS.write(java.lang.Object).

What to test:


testWriteByField

public final void testWriteByField()
Test method for H5CompoundDS.write(java.lang.Object).

What to test:


testGetDatatype

public final void testGetDatatype()
Test method for H5CompoundDS.getDatatype().

What to test:


testIsString

public final void testIsString()
Test method for H5CompoundDS.isString(int).

What to test:


testGetSize

public final void testGetSize()
Test method for H5CompoundDS.getSize(int).

What to test:


testH5CompoundDSFileFormatStringString

public final void testH5CompoundDSFileFormatStringString()
Test method for H5CompoundDS.H5CompoundDS(ncsa.hdf.object.FileFormat, java.lang.String, java.lang.String).

What to test:


testH5CompoundDSFileFormatStringStringLongArray

public final void testH5CompoundDSFileFormatStringStringLongArray()
Test method for H5CompoundDS.H5CompoundDS(ncsa.hdf.object.FileFormat, java.lang.String, java.lang.String, long[]).

What to test:


testGetMetadata

public final void testGetMetadata()
Test method for H5CompoundDS.getMetadata().

What to test:


testWriteMetadata

public final void testWriteMetadata()
Test method for H5CompoundDS.writeMetadata(java.lang.Object).

What to test:


testRemoveMetadata

public final void testRemoveMetadata()
Test method for H5CompoundDS.removeMetadata(java.lang.Object).

What to test:


testCreateStringGroupLongArrayStringArrayDatatypeArrayIntArrayObject

public final void testCreateStringGroupLongArrayStringArrayDatatypeArrayIntArrayObject()
Test method for H5CompoundDS.create(java.lang.String, ncsa.hdf.object.Group, long[], java.lang.String[], ncsa.hdf.object.Datatype[], int[], java.lang.Object).

Create a simple compound dataset, i.e. compound members can be either a scalar data or 1D array.

        public static Dataset create(
            String name,
            Group pgroup,
            long[] dims,
            String[] memberNames,
            Datatype[] memberDatatypes,
            int[] memberSizes,
            Object data) throws Exception
 

What to test:


testCreateStringGroupLongArrayStringArrayDatatypeArrayIntArrayIntArrayArrayObject

public final void testCreateStringGroupLongArrayStringArrayDatatypeArrayIntArrayIntArrayArrayObject()
Test method for H5CompoundDS.create(java.lang.String, ncsa.hdf.object.Group, long[], java.lang.String[], ncsa.hdf.object.Datatype[], int[], int[][], java.lang.Object).

Create a simple compound dataset, i.e. compound members can be multiple-dimensional array.

        public static Dataset create(
            String name,
            Group pgroup,
            long[] dims,
            String[] memberNames,
            Datatype[] memberDatatypes,
            int[] memberRanks,
            int[][] memberDims,
            Object data) throws Exception
 

What to test:


testCreateStringGroupLongArrayLongArrayLongArrayIntStringArrayDatatypeArrayIntArrayIntArrayArrayObject

public final void testCreateStringGroupLongArrayLongArrayLongArrayIntStringArrayDatatypeArrayIntArrayIntArrayArrayObject()
Test method for H5CompoundDS.create(java.lang.String, ncsa.hdf.object.Group, long[], long[], long[], int, java.lang.String[], ncsa.hdf.object.Datatype[], int[], int[][], java.lang.Object).

Create a simple compound dataset with compression options, i.e. compound members can be multiple-dimensional array.

        public static Dataset create(
            String name,
            Group pgroup,
            long[] dims,
            long[] maxdims,
            long[] chunks,
            int gzip,
            String[] memberNames,
            Datatype[] memberDatatypes,
            int[] memberRanks,
            int[][] memberDims,
            Object data) throws Exception
 

What to test: