Package org.jboss.arquillian.transaction.impl.test

Examples of org.jboss.arquillian.transaction.impl.test.TransactionalTestImpl


     * beginTransaction(org.jboss.arquillian.transaction.spi.test.TransactionalTest)} method.</p>
     */
    @Test
    public void testBeginTransaction() {

        instance.beginTransaction(new TransactionalTestImpl(null));

        verify(mockPlatformTransactionManager).getTransaction(any(TransactionDefinition.class));
        verify(mockPlatformTransactionManagerInstance).set(mockPlatformTransactionManager);
        verify(mockTransactionStatusInstance).set(mockTransactionStatus);
    }
View Full Code Here


    public void testRollbackTransaction() {

        when(mockPlatformTransactionManagerInstance.get()).thenReturn(mockPlatformTransactionManager);
        when(mockTransactionStatusInstance.get()).thenReturn(mockTransactionStatus);

        instance.rollbackTransaction(new TransactionalTestImpl(null));

        verify(mockPlatformTransactionManager).rollback(mockTransactionStatus);
    }
View Full Code Here

    public void testCommitTransaction() {

        when(mockPlatformTransactionManagerInstance.get()).thenReturn(mockPlatformTransactionManager);
        when(mockTransactionStatusInstance.get()).thenReturn(mockTransactionStatus);

        instance.commitTransaction(new TransactionalTestImpl(null));

        verify(mockPlatformTransactionManager).commit(mockTransactionStatus);
    }
View Full Code Here

                TransactionContext transactionContext = transactionContextInstance.get();
                transactionContext.activate();

                lifecycleEvent.fire(new BeforeTransactionStarted());

                transactionProvider.beginTransaction(new TransactionalTestImpl(getTransactionManager(beforeTest)));

                lifecycleEvent.fire(new AfterTransactionStarted());
            }
        }
    }
View Full Code Here

                    lifecycleEvent.fire(new BeforeTransactionEnded());

                    transactionProvider = getTransactionProvider();

                    TransactionalTest transactionalTest =
                            new TransactionalTestImpl(getTransactionManager(afterTest));

                    if (transactionMode == TransactionMode.ROLLBACK || isTestRequiresRollback()) {
                        // rollbacks the transaction
                        transactionProvider.rollbackTransaction(transactionalTest);
                    } else {
View Full Code Here

         TransactionContext transactionContext = transactionContextInstance.get();
         transactionContext.activate();

         lifecycleEvent.fire(new BeforeTransactionStarted());

         getTransactionProvider().beginTransaction(new TransactionalTestImpl(getTransactionManager(beforeTest)));

         lifecycleEvent.fire(new AfterTransactionStarted());
      }
   }
View Full Code Here

         try
         {
            lifecycleEvent.fire(new BeforeTransactionEnded());

            final TransactionProvider transactionProvider = getTransactionProvider();
            final TransactionalTest transactionalTest = new TransactionalTestImpl(getTransactionManager(afterTest));

            if (rollbackRequired(afterTest))
            {
               transactionProvider.rollbackTransaction(transactionalTest);
            }
View Full Code Here

            TransactionContext transactionContext = transactionContextInstance.get();
            transactionContext.activate();

            lifecycleEvent.fire(new BeforeTransactionStarted());

            getTransactionProvider().beginTransaction(new TransactionalTestImpl(getTransactionManager(beforeTest)));

            lifecycleEvent.fire(new AfterTransactionStarted());
        }
    }
View Full Code Here

            try {
                lifecycleEvent.fire(new BeforeTransactionEnded());

                TransactionProvider transactionProvider = getTransactionProvider();
                TransactionalTest transactionalTest = new TransactionalTestImpl(getTransactionManager(afterTest));

                if (rollbackRequired(afterTest)) {
                    transactionProvider.rollbackTransaction(transactionalTest);
                } else {
                    transactionProvider.commitTransaction(transactionalTest);
View Full Code Here

            TransactionContext transactionContext = transactionContextInstance.get();
            transactionContext.activate();

            lifecycleEvent.fire(new BeforeTransactionStarted());

            getTransactionProvider().beginTransaction(new TransactionalTestImpl(getTransactionManager(beforeTest)));

            lifecycleEvent.fire(new AfterTransactionStarted());
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.arquillian.transaction.impl.test.TransactionalTestImpl

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.