Package com.foreach.across.core.database

Examples of com.foreach.across.core.database.DatabaseInfo


  @Autowired
  private DataSource dataSource;

  @Test
  public void dataSourceShouldBeOneOfKnown() {
    DatabaseInfo databaseInfo = DatabaseInfo.retrieve( dataSource );

    assertNotNull( databaseInfo );
    assertNotNull( databaseInfo.getProductName() );
    assertNotNull( databaseInfo.getProductVersion() );

    LOG.info( "DatabaseInfo detected database {} - version: {}", databaseInfo.getProductName(),
              databaseInfo.getProductVersion() );

    assertTrue(
        databaseInfo.isHsql()
            || databaseInfo.isOracle()
            || databaseInfo.isSqlServer()
            || databaseInfo.isMySQL()
    );
  }
View Full Code Here


          environment.getRequiredProperty( "acrossTest.datasource." + dsName + ".username" ) );
      dataSource.setPassword(
          environment.getRequiredProperty( "acrossTest.datasource." + dsName + ".password" ) );
    }

    DatabaseInfo databaseInfo = DatabaseInfo.retrieve( dataSource );
    System.out.println(
        "Connection to " + databaseInfo.getProductName() + " - version: " + databaseInfo.getProductVersion() );

    return dataSource;
  }
View Full Code Here

TOP

Related Classes of com.foreach.across.core.database.DatabaseInfo

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.