Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Database
Class OJBDatabaseMgrTest  view OJBDatabaseMgrTest download OJBDatabaseMgrTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byDatabase.OJBDatabaseMgrTest
All Implemented Interfaces:
junit.framework.Test

public class OJBDatabaseMgrTest
extends junit.framework.TestCase

*********************************** Copyright Notice Copyright (c) 1999, Regents of the University of California. All rights reserved. DISCLAIMER THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ************************************


Field Summary
(package private) static java.lang.String databaseType
           
(package private) static java.lang.String databaseURL
           
(package private)  gov.lanl.Database.DatabaseMgr dbMgr
           
(package private) static gov.lanl.Database.PersistentObject emptyObsData_
           
(package private) static java.lang.String loadFile
           
(package private) static gov.lanl.COAS.Qualifier2AttributeMapper mapper
           
(package private)  gov.lanl.Database.PersistentObject[] obsData_Seq
           
(package private) static java.lang.String parserName
           
(package private) static java.lang.String persistentProperties
           
(package private)  gov.lanl.Database.PersistentObjectFactory persObjFact
           
(package private) static java.lang.String personIdCode
           
(package private)  gov.lanl.Utility.ConfigProperties props
           
(package private) static java.lang.String signingCode
           
(package private) static java.lang.String startTimeCode
           
(package private) static java.lang.String stopTimeCode
           
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
OJBDatabaseMgrTest(java.lang.String testName)
          Constructor declaration
 
Method Summary
protected  gov.lanl.Database.PersistentObject[] createPersistentObsData(org.omg.DsObservationAccess.ObservationDataStruct[] obsDataSeq)
          Convert ObservationData to persistent PersistentObject
protected  void deleteData(gov.lanl.Database.PersistentObject[] obsData_Seq)
          Delet data from database
protected  int getFilter(gov.lanl.Database.SearchFilter filter, int i)
          Dispatcher method to create different kinds of searchFilter
protected  void init()
          This method is only called once at construction time
protected  org.omg.DsObservationAccess.ObservationDataStruct[] loadObsData(java.lang.String loadFile)
          Loads the test data from TestObsData.xml
static void main(java.lang.String[] args)
          Method declaration
protected  void setUp()
          overriden template method
protected  void storeData(gov.lanl.Database.PersistentObject[] obsData_Seq)
          Insert data into database
static junit.framework.Test suite()
          Method declaration
protected  void tearDown()
          overriden template method
 void testAccessElements()
          Test of accessElements method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testDeleteElement()
          Test of deleteElement method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testGetNextSeq()
          Test of getNextSeq method, of class gov.lanl.Database.OJBDatabaseMgr
 void testInsertElement()
          Test of insertElement method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testRetrieveElement()
          Test of retrieveElement method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testRetrieveElementDeep()
          Test of retrieveElement method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testRetrieveElementsByFilter()
          Test of retrieveElements method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testRetrieveElementsByVector()
          Test of retrieveElements method, of class gov.lanl.Database.OJBDatabaseMgr.
 void testUpdateElement()
          Test of updateElement method, of class gov.lanl.Database.OJBDatabaseMgr.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Field Detail

dbMgr

gov.lanl.Database.DatabaseMgr dbMgr

persObjFact

gov.lanl.Database.PersistentObjectFactory persObjFact

obsData_Seq

gov.lanl.Database.PersistentObject[] obsData_Seq

mapper

static gov.lanl.COAS.Qualifier2AttributeMapper mapper

loadFile

static java.lang.String loadFile

databaseType

static java.lang.String databaseType

databaseURL

static java.lang.String databaseURL

persistentProperties

static java.lang.String persistentProperties

personIdCode

static java.lang.String personIdCode

startTimeCode

static java.lang.String startTimeCode

stopTimeCode

static java.lang.String stopTimeCode

signingCode

static java.lang.String signingCode

parserName

static java.lang.String parserName

emptyObsData_

static gov.lanl.Database.PersistentObject emptyObsData_

props

gov.lanl.Utility.ConfigProperties props
Constructor Detail

OJBDatabaseMgrTest

public OJBDatabaseMgrTest(java.lang.String testName)
Constructor declaration

Method Detail

main

public static void main(java.lang.String[] args)
Method declaration


suite

public static junit.framework.Test suite()
Method declaration


testRetrieveElement

public void testRetrieveElement()
Test of retrieveElement method, of class gov.lanl.Database.OJBDatabaseMgr.


testRetrieveElementDeep

public void testRetrieveElementDeep()
Test of retrieveElement method, of class gov.lanl.Database.OJBDatabaseMgr.


testUpdateElement

public void testUpdateElement()
Test of updateElement method, of class gov.lanl.Database.OJBDatabaseMgr.


testDeleteElement

public void testDeleteElement()
Test of deleteElement method, of class gov.lanl.Database.OJBDatabaseMgr.


testInsertElement

public void testInsertElement()
Test of insertElement method, of class gov.lanl.Database.OJBDatabaseMgr.


testAccessElements

public void testAccessElements()
Test of accessElements method, of class gov.lanl.Database.OJBDatabaseMgr.


testRetrieveElementsByVector

public void testRetrieveElementsByVector()
Test of retrieveElements method, of class gov.lanl.Database.OJBDatabaseMgr.


testRetrieveElementsByFilter

public void testRetrieveElementsByFilter()
Test of retrieveElements method, of class gov.lanl.Database.OJBDatabaseMgr.


getFilter

protected int getFilter(gov.lanl.Database.SearchFilter filter,
                        int i)
Dispatcher method to create different kinds of searchFilter


testGetNextSeq

public void testGetNextSeq()
Test of getNextSeq method, of class gov.lanl.Database.OJBDatabaseMgr


init

protected void init()
This method is only called once at construction time


setUp

protected void setUp()
overriden template method


tearDown

protected void tearDown()
overriden template method


loadObsData

protected org.omg.DsObservationAccess.ObservationDataStruct[] loadObsData(java.lang.String loadFile)
Loads the test data from TestObsData.xml


createPersistentObsData

protected gov.lanl.Database.PersistentObject[] createPersistentObsData(org.omg.DsObservationAccess.ObservationDataStruct[] obsDataSeq)
Convert ObservationData to persistent PersistentObject


storeData

protected void storeData(gov.lanl.Database.PersistentObject[] obsData_Seq)
Insert data into database


deleteData

protected void deleteData(gov.lanl.Database.PersistentObject[] obsData_Seq)
Delet data from database