org.apache.ojb.odmg
Class OneToManyTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.ojb.odmg.OneToManyTest
All Implemented Interfaces:
junit.framework.Test

public class OneToManyTest
extends junit.framework.TestCase


Field Summary
(package private)  int articleID
           
(package private)  int groupID
           
 
Constructor Summary
OneToManyTest(java.lang.String name)
          Insert the method's description here.
 
Method Summary
 void brokenTestUpdateWithProxy()
          tests creation of new object that has a one to many relationship.
protected  Article createArticle(int id)
          Create an article with 4 product groups related to it in a 1-N relationship
static void main(java.lang.String[] args)
           
 void notYetCorrectTestCreate()
          tests creation of new object that has a one to many relationship
 void setUp()
          Insert the method's description here.
 void tearDown()
          Insert the method's description here.
 void testPolymorphOneToMany()
          this tests if polymorph collections (i.e.
 
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

groupID

int groupID

articleID

int articleID
Constructor Detail

OneToManyTest

public OneToManyTest(java.lang.String name)
Insert the method's description here. Creation date: (24.12.2000 00:33:40)

Method Detail

main

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

setUp

public void setUp()
Insert the method's description here. Creation date: (06.12.2000 21:58:53)


tearDown

public void tearDown()
Insert the method's description here. Creation date: (06.12.2000 21:59:14)


notYetCorrectTestCreate

public void notYetCorrectTestCreate()
                             throws java.lang.Exception
tests creation of new object that has a one to many relationship

Throws:
java.lang.Exception

brokenTestUpdateWithProxy

public void brokenTestUpdateWithProxy()
                               throws java.lang.Exception
tests creation of new object that has a one to many relationship. thma: thhis test will not work, because ODMG is no able to track modifictations to normal collections. Only Odmg Collections like DList will be treated properly.

Throws:
java.lang.Exception

testPolymorphOneToMany

public void testPolymorphOneToMany()
this tests if polymorph collections (i.e. collections of objects implementing a common interface) are treated correctly


createArticle

protected Article createArticle(int id)
Create an article with 4 product groups related to it in a 1-N relationship

Parameters:
id -
Returns:


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14