use of org.hibernate.classic.Session in project gocd by gocd.
the class PipelineStateDaoTest method setup.
@Before
public void setup() throws Exception {
goCache = new StubGoCache(new TestTransactionSynchronizationManager());
goCache.clear();
mockSessionFactory = mock(SessionFactory.class);
transactionTemplate = mock(TransactionTemplate.class);
pipelineStateDao = new PipelineStateDao(null, null, goCache, null, transactionTemplate, null, null, null, null, mock(Database.class), mockSessionFactory);
session = mock(Session.class);
when(mockSessionFactory.getCurrentSession()).thenReturn(session);
}
Aggregations