Package org.jtester.annotations.Transactional

Examples of org.jtester.annotations.Transactional.TransactionMode


   */
  public static TransactionMode getTransactionMode() {
    if (context.testedObject == null || context.testedMethod == null) {
      return TransactionMode.DISABLED;
    }
    TransactionMode transactionMode = getMethodOrClassLevelAnnotationProperty(Transactional.class, "value",
        DEFAULT, context.testedMethod, context.testedClazz);
    if (transactionMode == TransactionMode.DEFAULT) {
      String mode = ConfigurationHelper.getString(TRANSACTIONAL_MODE_DEFAULT, "DISABLED");
      transactionMode = TransactionMode.valueOf(mode.toUpperCase());
    }
View Full Code Here


   */
  public static boolean isTransactionsEnabled() {
    if (context.testedObject == null || context.testedMethod == null) {
      return false;
    } else {
      TransactionMode mode = getTransactionMode();
      return mode == COMMIT || mode == ROLLBACK;
    }
  }
View Full Code Here

   * 结束测试事务<br>
   * <br>
   * End an already existed transaction and remove it.
   */
  public void endTransaction() {
    TransactionMode mode = TestedObject.getTransactionMode();
    if (mode == null || mode == DISABLED || mode == DEFAULT) {
      return;
    }
    if (mode == COMMIT) {
      commit();
View Full Code Here

TOP

Related Classes of org.jtester.annotations.Transactional.TransactionMode

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.