@Test public void testGettersAndSetters() throws Exception { CustomerDAO dao = new CustomerDAO(); ITransactionManager txMgr = EasyMock.createStrictMock(ITransactionManager.class); IConfiguration configuration = EasyMock.createStrictMock(IConfiguration.class); dao.setTransactionManager(txMgr); dao.setConfiguration(configuration); assertEquals("Wrong transaction manager.", txMgr, dao.getTransactionManager()); assertEquals("Wrong customer service.", configuration, dao.getConfiguration()); }
@Test public void testConstructor() throws Exception { CustomerDAO dao = new CustomerDAO(); assertNull("txManager should be null.", dao.getTransactionManager()); }