站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

TransactionAssert - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.test.framework.junit
Class TransactionAssert

java.lang.Object
  extended byjunit.framework.Assert
      extended byorg.jboss.portal.test.framework.junit.TransactionAssert

public class TransactionAssert
extends junit.framework.Assert


Constructor Summary
TransactionAssert()
           
 
Method Summary
static void assertStatusEquals(int expectedStatus)
          Assert the status of the current transaction.
static void beginTransaction()
          Begin a transaction or fail.
static void commitTransaction()
          Commit the transaction or fail.
static void endTransaction()
          If no transaction do nothing.
static javax.transaction.UserTransaction getUserTransaction()
           
static void rollbackTransaction()
          Rollback the transaction or fail.
static void rollbackTransaction(boolean marked)
           
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransactionAssert

public TransactionAssert()
Method Detail

assertStatusEquals

public static void assertStatusEquals(int expectedStatus)
Assert the status of the current transaction.

Parameters:
expectedStatus - the expected status

commitTransaction

public static void commitTransaction()
Commit the transaction or fail.


rollbackTransaction

public static void rollbackTransaction()
Rollback the transaction or fail.


rollbackTransaction

public static void rollbackTransaction(boolean marked)

beginTransaction

public static void beginTransaction()
Begin a transaction or fail.


endTransaction

public static void endTransaction()
If no transaction do nothing. End the transaction if it is active or marked for rollback otherwise fail.


getUserTransaction

public static javax.transaction.UserTransaction getUserTransaction()