Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.common.junit
Class TransactionAssert

    java.lang.Object
      junit.framework.Assert
          org.jboss.portal.common.junit.TransactionAssert

    public class TransactionAssert

extends junit.framework.Assert

Version:
  $Revision: 7228 $
Author:
  Julien Viet

Nested Class Summary
`static class` | `TransactionAssert.Terminator`

Field Summary
`static TransactionAssert.Terminator` | `MARKED_AS_ROLLBACK` .
`static TransactionAssert.Terminator` | `MUST_COMMIT` .
`static TransactionAssert.Terminator` | `MUST_ROLLBACK` .
`static TransactionAssert.Terminator` | `NONE` .

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 java.lang.String` | `decodeStatus(int status)` Decode the status name.
`static int` | `endTransaction()` If no transaction do nothing.
`static int` | `endTransaction(TransactionAssert.Terminator expectedTerminator)` 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`

Field Detail

### NONE

    public static final TransactionAssert.Terminator NONE

  .

### MARKED_AS_ROLLBACK

    public static final TransactionAssert.Terminator MARKED_AS_ROLLBACK

  .

### MUST_COMMIT

    public static final TransactionAssert.Terminator MUST_COMMIT

  .

### MUST_ROLLBACK

    public static final TransactionAssert.Terminator MUST_ROLLBACK

  .

Constructor Detail

### TransactionAssert

    public TransactionAssert()

Method Detail

### decodeStatus

    public static java.lang.String decodeStatus(int status)

  Decode the status name.

  Parameters:
    `status` - the status value
  Returns:
    the translated status name or null if it is not valid

### 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 int endTransaction()

  If no transaction do nothing. End the transaction if it is active or marked for rollback otherwise fail.

### endTransaction

    public static int endTransaction(TransactionAssert.Terminator expectedTerminator)

  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()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008. All Rights Reserved.