Package org.jtester.module.database.environment

Examples of org.jtester.module.database.environment.DBEnvironment


    super.setUp(firstTable, testResults);
  }

  @Override
  public void tearDown(Table firstTable, TestResults testResults) {
    DBEnvironment environment = workingEnvironment();

    try {
      JTesterLogger.info("tearDown dbfit table");
      if (environment == null) {
        return;
      }
      RunIn runIn = DbFitContext.getRunIn();
      boolean isEnabledTransaction = TestedObject.isTransactionsEnabled();
      if (runIn == RunIn.TestCase) {
        JTesterLogger.info("run in testcase, isEnabledTransaction:" + isEnabledTransaction);
      }

      if (runIn == RunIn.TestCase && isEnabledTransaction == false) {
        commit();
      }
      environment.teardown();
    } catch (Throwable e) {
      this.exception(firstTable.parse, e);
    }
    super.tearDown(firstTable, testResults);
  }
View Full Code Here


    }
    super.tearDown(firstTable, testResults);
  }

  public boolean connect() throws SQLException {
    DBEnvironment environment = workingEnvironment();
    environment.connect();
    return true;
  }
View Full Code Here

    environment.connect();
    return true;
  }

  public boolean connect(String type, String driver, String url, String username, String password) throws Exception {
    DBEnvironment environment = DBEnvironmentFactory.getDBEnvironment(type, driver, url, username, password);
    DBEnvironmentFactory.changeDBEnvironment(environment);
    environment.connect();
    return true;
  }
View Full Code Here

  }

  final static String NO_VALID_VALUE_MESSAGE = "can't find valid value of key[%s] in file[%s]!";

  public boolean connectFromFile(String dbname) throws Exception {
    DBEnvironment environment = DBEnvironmentFactory.getDBEnvironment(dbname);
    DBEnvironmentFactory.changeDBEnvironment(environment);
    environment.connect();

    return true;
  }
View Full Code Here

    return true;
  }

  public boolean connectFromFile(String dataSourceName, String propFile) throws Exception {
    DBEnvironment environment = DBEnvironmentFactory.getDBEnvironment(dataSourceName, propFile);
    DBEnvironmentFactory.changeDBEnvironment(environment);
    environment.connect();

    return true;
  }
View Full Code Here

    DbFixtureUtil.setParameter(name, value);
    return true;
  }

  public Fixture storeQuery(String query, String symbolName) {
    DBEnvironment environment = workingEnvironment();
    return new StoreQueryFixture(environment, query, symbolName);
  }
View Full Code Here

    SymbolUtil.cleanSymbols();
    return true;
  }

  public Fixture query(String query) {
    DBEnvironment environment = workingEnvironment();
    return new QueryFixture(environment, query);
  }
View Full Code Here

    DBEnvironment environment = workingEnvironment();
    return new QueryFixture(environment, query);
  }

  public Fixture orderedQuery(String query) {
    DBEnvironment environment = workingEnvironment();
    return new QueryFixture(environment, query, true);
  }
View Full Code Here

    DBEnvironment environment = workingEnvironment();
    return new QueryFixture(environment, query, true);
  }

  public boolean execute(String statement) {
    DBEnvironment environment = workingEnvironment();
    return DbFixtureUtil.execute(environment, statement);
  }
View Full Code Here

    DBEnvironment environment = workingEnvironment();
    return DbFixtureUtil.execute(environment, statement);
  }

  public Fixture executeProcedure(String statement) {
    DBEnvironment environment = workingEnvironment();
    return new ExecuteProcedureFixture(environment, statement);
  }
View Full Code Here

TOP

Related Classes of org.jtester.module.database.environment.DBEnvironment

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.