Package org.datanucleus.store.rdbms.jdbc

Examples of org.datanucleus.store.rdbms.jdbc.DatabaseMetaData


     * datastores are identified by product name
     * test unknown product
     */
    public void testGetNewDatastoreAdapter1()
    {
        DatabaseMetaData md = new DatabaseMetaData();
        md.setProductName("unknown");
        md.setProductVersion("1");
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);
        assertNull(adapter);
    }
View Full Code Here


     * datastores are identified by product name
     * test unknown product with given adapterClassName 
     */
    public void testGetNewDatastoreAdapter2()
    {
        DatabaseMetaData md = new DatabaseMetaData();
        md.setProductName("unknown");
        md.setProductVersion("1");
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, DerbyAdapter.class.getName(), pluginMgr);
        assertNotNull(adapter);
        assertEquals(DerbyAdapter.class.getName(), adapter.getClass().getName());
    }
View Full Code Here

     * datastores are identified by product name
     * test Derby adapter with null adapterClassName 
     */
    public void testGetNewDatastoreAdapter3()
    {
        DatabaseMetaData md = new DatabaseMetaData();
   
        //test Derby adapter 
        md.setProductName("Derby");
        md.setProductVersion("10");
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);
        assertNotNull(adapter);
        assertEquals(DerbyAdapter.class.getName(), adapter.getClass().getName());
    }
View Full Code Here

     * datastores are identified by product name
     * test jdbc driver returns null for product name 
     */
    public void testGetNewDatastoreAdapter4()
    {
        DatabaseMetaData md = new DatabaseMetaData();
   
        md.setProductName(null);
        DatastoreAdapter adapter = factory.getNewDatastoreAdapter(clr, md, null, pluginMgr);
        assertNull(adapter);
    }
View Full Code Here

TOP

Related Classes of org.datanucleus.store.rdbms.jdbc.DatabaseMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.