Package org.pentaho.platform.engine.services.audit

Examples of org.pentaho.platform.engine.services.audit.AuditConnection.initialize()


  public void testAuditConnection() {
    startTest();
    AuditConnection auditConnection = new AuditConnection();
    auditConnection.setUseNewDatasourceService( true ); // make sure we get a datasource from the object factory
    auditConnection.initialize();
    MockDataSourceService.setThrowExceptionOnGetConnection(false);
    try {
      Connection connection = auditConnection.getAuditConnection();
      System.out.println( "Audit Connection Is  " + connection ); //$NON-NLS-1$ 
View Full Code Here


  public void testAuditConnectionNoConfigFile() {
    startTest();
    SOLUTION_PATH = ""; // We want to test what happens when the config file can't be found
    AuditConnection auditConnection = new AuditConnection();
    auditConnection.setUseNewDatasourceService( true ); // make sure we get a datasource from the object factory
    auditConnection.initialize();
    MockDataSourceService.setThrowExceptionOnGetConnection(false);
    try {
      Connection connection = auditConnection.getAuditConnection();
      System.out.println( "Audit Connection Is  " + connection ); //$NON-NLS-1$ 
View Full Code Here

      factory.init( "test-res/solution/system/pentahoObjects.datasourceservice.null.spring.xml", null );
      PentahoSystem.registerObjectFactory( factory );

      AuditConnection auditConnection = new AuditConnection();
      auditConnection.setUseNewDatasourceService( true ); // make sure we get a datasource from the object factory
      auditConnection.initialize();
      MockDataSourceService.setThrowExceptionOnGetConnection(true);
      auditConnection.getAuditConnection();
      fail( "Expected exception when no audit connection could be established" );
    } catch ( SQLException ex ) {
      ex.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.