test.unittests
Class H5FileTest

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

public class H5FileTest
extends TestCase

TestCase for H5File.

This class tests all the public methods in H5ScalarDS 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
H5FileTest(java.lang.String arg0)
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testCopyHObjectGroup()
          Test method for FileFormat.copy(ncsa.hdf.object.HObject, ncsa.hdf.object.Group).
 void testCreateGroup()
          Test method for H5File.createGroup(java.lang.String, ncsa.hdf.object.Group).
 void testCreateImageAttributes()
          Test method for H5File.createImageAttributes(ncsa.hdf.object.Dataset, int).
 void testCreateObjects()
          Test method for H5File.createScalarDS(java.lang.String, ncsa.hdf.object.Group, ncsa.hdf.object.Datatype, long[], long[], long[], int, java.lang.Object),
FileFormat.createCompoundDS(java.lang.String, ncsa.hdf.object.Group, long[], java.lang.String[], ncsa.hdf.object.Datatype[], int[], java.lang.Object),
H5File.createCompoundDS(java.lang.String, ncsa.hdf.object.Group, long[], long[], long[], int, java.lang.String[], ncsa.hdf.object.Datatype[], int[], java.lang.Object),
H5File.createImage(java.lang.String, ncsa.hdf.object.Group, ncsa.hdf.object.Datatype, long[], long[], long[], int, int, int, java.lang.Object),
H5File.createDatatype(int, int, int, int),
H5File.createDatatype(int, int, int, int, java.lang.String),
H5File.createLink(ncsa.hdf.object.Group, java.lang.String, ncsa.hdf.object.HObject),
H5File.get(java.lang.String),
H5File.getAttribute(int),
H5File.writeAttribute(ncsa.hdf.object.HObject, ncsa.hdf.object.Attribute, boolean).
 void testCreateString()
          Test method for FileFormat.create(java.lang.String).
 void testDeleteHObject()
          Test method for H5File.delete(ncsa.hdf.object.HObject).
 void testGet()
          Test method for H5File.get(java.lang.String).
 void testGetFromOpen()
          Test method for H5File.get(java.lang.String).
 void testGetRootNode()
          Test method for H5File.getRootNode().
 void testH5FileStringInt()
          Test method for H5File.H5File(java.lang.String, int).
 void testIsReadOnly()
          Test method for FileFormat.isReadOnly().
 void testIsThisTypeFileFormat()
          Test method for H5File.isThisType(ncsa.hdf.object.FileFormat).
 void testIsThisTypeString()
          Test method for H5File.isThisType(java.lang.String).
 void testOpen()
          Test method for H5File.open().
 void testOpenInt()
          Test method for H5File.open(int).
 void testUpdateReferenceDataset()
          Test method for H5File.updateReferenceDataset(ncsa.hdf.object.h5.H5File, ncsa.hdf.object.h5.H5File).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

H5FileTest

public H5FileTest(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

testOpen

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

What to test:


testCreateString

public final void testCreateString()
Test method for FileFormat.create(java.lang.String).

What to test:


testGetRootNode

public final void testGetRootNode()
Test method for H5File.getRootNode().

What to test:


testIsReadOnly

public final void testIsReadOnly()
Test method for FileFormat.isReadOnly().


testCreateGroup

public final void testCreateGroup()
Test method for H5File.createGroup(java.lang.String, ncsa.hdf.object.Group).

What to test:


testCreateObjects

public final void testCreateObjects()
Test method for H5File.createScalarDS(java.lang.String, ncsa.hdf.object.Group, ncsa.hdf.object.Datatype, long[], long[], long[], int, java.lang.Object),
FileFormat.createCompoundDS(java.lang.String, ncsa.hdf.object.Group, long[], java.lang.String[], ncsa.hdf.object.Datatype[], int[], java.lang.Object),
H5File.createCompoundDS(java.lang.String, ncsa.hdf.object.Group, long[], long[], long[], int, java.lang.String[], ncsa.hdf.object.Datatype[], int[], java.lang.Object),
H5File.createImage(java.lang.String, ncsa.hdf.object.Group, ncsa.hdf.object.Datatype, long[], long[], long[], int, int, int, java.lang.Object),
H5File.createDatatype(int, int, int, int),
H5File.createDatatype(int, int, int, int, java.lang.String),
H5File.createLink(ncsa.hdf.object.Group, java.lang.String, ncsa.hdf.object.HObject),
H5File.get(java.lang.String),
H5File.getAttribute(int),
H5File.writeAttribute(ncsa.hdf.object.HObject, ncsa.hdf.object.Attribute, boolean).

What to test:


testIsThisTypeString

public final void testIsThisTypeString()
Test method for H5File.isThisType(java.lang.String).

What to test:


testIsThisTypeFileFormat

public final void testIsThisTypeFileFormat()
Test method for H5File.isThisType(ncsa.hdf.object.FileFormat).

What to test:


testCopyHObjectGroup

public final void testCopyHObjectGroup()
Test method for FileFormat.copy(ncsa.hdf.object.HObject, ncsa.hdf.object.Group).

What to test:


testDeleteHObject

public final void testDeleteHObject()
Test method for H5File.delete(ncsa.hdf.object.HObject).

What to test:


testGet

public final void testGet()
Test method for H5File.get(java.lang.String).

What to test:


testGetFromOpen

public final void testGetFromOpen()
Test method for H5File.get(java.lang.String).

What to test:


testH5FileStringInt

public final void testH5FileStringInt()
Test method for H5File.H5File(java.lang.String, int).

What to test:


testOpenInt

public final void testOpenInt()
Test method for H5File.open(int).

What to test:


testUpdateReferenceDataset

public final void testUpdateReferenceDataset()
Test method for H5File.updateReferenceDataset(ncsa.hdf.object.h5.H5File, ncsa.hdf.object.h5.H5File).

What to test:


testCreateImageAttributes

public final void testCreateImageAttributes()
Test method for H5File.createImageAttributes(ncsa.hdf.object.Dataset, int).