org.deegree.metadata.iso.persistence.inspectors
Class InspectorIdentifierTest

java.lang.Object
  extended by org.deegree.metadata.iso.persistence.AbstractISOTest
      extended by org.deegree.metadata.iso.persistence.inspectors.InspectorIdentifierTest

public class InspectorIdentifierTest
extends AbstractISOTest

TODO add class documentation here

Version:
$Revision: 30779 $, $Date: 2011-05-11 16:04:22 +0200 (Mi, 11. Mai 2011) $
Author:
Steffen Thomas, last edited by: $Author: mschneider $

Field Summary
 
Fields inherited from class org.deegree.metadata.iso.persistence.AbstractISOTest
conn, jdbcPass, jdbcURL, jdbcUser, nsContext, resultSet, store
 
Constructor Summary
InspectorIdentifierTest()
           
 
Method Summary
 void testIdentifierRejectFalse()
          If the fileIdentifier should be generated automaticaly if not set.
 void testIdentifierRejectTrue()
          If the fileIdentifier shouldn't be generated automaticaly if not set.
 void testIdentifierRejectTrue2()
          If the fileIdentifier shouldn't be generated automaticaly if not set.
 
Methods inherited from class org.deegree.metadata.iso.persistence.AbstractISOTest
setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InspectorIdentifierTest

public InspectorIdentifierTest()
Method Detail

testIdentifierRejectTrue2

public void testIdentifierRejectTrue2()
                               throws MetadataStoreException,
                                      MetadataInspectorException,
                                      ResourceInitException
If the fileIdentifier shouldn't be generated automaticaly if not set.

1.xml has no fileIdentifier and no ResourceIdentifier -> reject
3.xml has a fileIdentifier -> insert
Output should be a MetadataStoreException

Throws:
MetadataStoreException
MetadataInspectorException
MetadataStoreException
MetadataInspectorException
MetadataInspectorException
ResourceInitException
SQLException

testIdentifierRejectFalse

public void testIdentifierRejectFalse()
                               throws MetadataStoreException,
                                      MetadataInspectorException,
                                      ResourceInitException
If the fileIdentifier should be generated automaticaly if not set.

1.xml has no fileIdentifier
2.xml has a fileIdentifier

Throws:
MetadataStoreException
MetadataInspectorException
ResourceInitException

testIdentifierRejectTrue

public void testIdentifierRejectTrue()
                              throws MetadataStoreException,
                                     MetadataInspectorException,
                                     ResourceInitException
If the fileIdentifier shouldn't be generated automaticaly if not set.

1.xml has no fileIdentifier but with one ResourceIdentifier -> insert
2.xml has a fileIdentifier -> insert Output: 2 because 1.xml has a resourceIdentifier which can be taken

Throws:
MetadataStoreException
MetadataInspectorException
ResourceInitException


Copyright © 2011. All Rights Reserved.