use of org.ow2.proactive.db.TransactionHelper in project scheduling by ow2-proactive.
the class TransactionHelperTest method setUp.
@Before
public void setUp() {
sessionFactory = mock(SessionFactory.class);
session = mock(Session.class);
transaction = mock(Transaction.class);
when(sessionFactory.openSession()).thenReturn(session);
when(session.beginTransaction()).thenReturn(transaction);
when(session.getTransaction()).thenReturn(transaction);
transactionHelper = new TransactionHelper(sessionFactory);
sessionWork = mock(SessionWork.class);
}
Aggregations