DuplicateTableNamesTest.java :  » Database-ORM » TJDO » com » triactive » jdo » test » naming » Java Open Source

Java Open Source » Database ORM » TJDO 
TJDO » com » triactive » jdo » test » naming » DuplicateTableNamesTest.java
/*
 * Copyright 2003 (C) TJDO.
 * All rights reserved.
 *
 * This software is distributed under the terms of the TJDO License version 1.0.
 * See the terms of the TJDO License in the documentation provided with this software.
 *
 * $Id: DuplicateTableNamesTest.java,v 1.1 2003/08/03 01:58:17 jackknifebarber Exp $
 */

package com.triactive.jdo.test.naming;

import com.triactive.jdo.test.StorageTestCase;


/**
 * Tests table name collision handling.
 *
 * @author <a href="mailto:mmartin5@austin.rr.com">Mike Martin</a>
 * @version $Revision: 1.1 $
 */

public class DuplicateTableNamesTest extends StorageTestCase
{
    /**
     * Used by the JUnit framework to construct tests.  Normally, programmers
     * would never explicitly use this constructor.
     *
     * @param name   Name of the <tt>TestCase</tt>.
     */

    public DuplicateTableNamesTest(String name)
    {
        super(name);
    }


    public void testDuplicateTableNames() throws Exception
    {
        Class[] classes = new Class[]
        {
            com.triactive.jdo.test.naming.foo.Collision.class,
            com.triactive.jdo.test.naming.bar.Collision.class
        };

        addClassesToSchema(classes);

        for (int i = 0; i < classes.length; ++i)
        {
            insertObjects(classes[i]);
            validateObjects(classes[i]);
            removeObjects();
        }
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.