use of com.arjuna.ats.internal.jta.transaction.arjunacore.subordinate.TransactionImple in project narayana by jbosstm.
the class SubordinateTxUnitTest method testTransactionImple.
@Test
public void testTransactionImple() throws Exception {
TransactionImple tx = new TransactionImple(0);
TransactionImple dummy = new TransactionImple(0);
assertFalse(tx.equals(dummy));
try {
tx.commit();
fail();
} catch (final IllegalStateException ex) {
}
try {
tx.rollback();
fail();
} catch (InvalidTerminationStateException ex) {
}
assertEquals(tx.doPrepare(), TwoPhaseOutcome.PREPARE_READONLY);
tx.doCommit();
dummy.doRollback();
tx = new TransactionImple(10);
tx.doOnePhaseCommit();
tx.doForget();
tx.doBeforeCompletion();
assertTrue(tx.toString() != null);
assertTrue(tx.activated());
}
Aggregations