KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > test > naming > DuplicateTableNamesTest


1 /*
2  * Copyright 2003 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: DuplicateTableNamesTest.java,v 1.1 2003/08/03 01:58:17 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.test.naming;
12
13 import com.triactive.jdo.test.StorageTestCase;
14
15
16 /**
17  * Tests table name collision handling.
18  *
19  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
20  * @version $Revision: 1.1 $
21  */

22
23 public class DuplicateTableNamesTest extends StorageTestCase
24 {
25     /**
26      * Used by the JUnit framework to construct tests. Normally, programmers
27      * would never explicitly use this constructor.
28      *
29      * @param name Name of the <tt>TestCase</tt>.
30      */

31
32     public DuplicateTableNamesTest(String JavaDoc name)
33     {
34         super(name);
35     }
36
37
38     public void testDuplicateTableNames() throws Exception JavaDoc
39     {
40         Class JavaDoc[] classes = new Class JavaDoc[]
41         {
42             com.triactive.jdo.test.naming.foo.Collision.class,
43             com.triactive.jdo.test.naming.bar.Collision.class
44         };
45
46         addClassesToSchema(classes);
47
48         for (int i = 0; i < classes.length; ++i)
49         {
50             insertObjects(classes[i]);
51             validateObjects(classes[i]);
52             removeObjects();
53         }
54     }
55 }
56
Popular Tags