@Before public void setUp() throws Exception { // rebuild the DB before each method dbBuilder.rebuildAll(); // generate test data testDataGen.generateData(); }
@Before public void setUp() throws Exception { // create menu service service = new MenuService(daoFactory); // rebuild the DB before each method dbBuilder.rebuildAll(); // generate test data testDataGen.generateData(); }
@AfterClass public static void tearDownAfterClass() throws Exception { dbBuilder.rebuildAll(); testDataGen.generateData(); // release and close resources dbBuilder = null; testDataGen = null; daoFactory = null; // close connection data source (pool) connFactory.close(); }