Package com.google.enterprise.connector.util.database.testing

Examples of com.google.enterprise.connector.util.database.testing.TestJdbcDatabase


    assertTrue(connector.isShutdown());
  }

  /** Test databaseAccess. */
  public void testDatabaseAccess() throws Exception {
    cpsFactory = new ConnectorPersistentStoreFactory(new TestJdbcDatabase());
    SimpleTestConnector connector = makeSimpleConnector();

    // Make sure we don't actually give transient connectors access to the DB.
    assertNull(connector.getDatabaseAccess());
  }
View Full Code Here


  /**
   * Test newConnectorPersistentStore.
   */
  public void testNewConnectorPersistentStore() throws Exception {
    JdbcDatabase database = new TestJdbcDatabase();
    ConnectorPersistentStoreFactory factory =
        new ConnectorPersistentStoreFactory(database);

    ConnectorPersistentStore cpStore =
        factory.newConnectorPersistentStore("test", "TestConnectorA", null);
    assertNotNull(cpStore);

    LocalDatabase localDb = cpStore.getLocalDatabase();
    assertNotNull(localDb);
    assertSame(database.getDataSource(), localDb.getDataSource());
    assertEquals(database.getDatabaseType(), localDb.getDatabaseType());

    assertNull(cpStore.getLocalDocumentStore());
  }
View Full Code Here

    connectorNonSocial.init();
    sessionNonSocial = initSession(connectorNonSocial);
  }

  static private Session initSession(SharepointConnector connector) throws Exception {
    TestJdbcDatabase database = new TestJdbcDatabase();
    ConnectorPersistentStoreFactory factory =
        new ConnectorPersistentStoreFactory(database);
    ConnectorPersistentStore store =
        factory.newConnectorPersistentStore("test", "Sharepoint", null);
    connector.setUserGroupMembershipRowMapper(
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.database.testing.TestJdbcDatabase

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.