Пример #1
0
  @Before
  public void setUp() throws Exception {
    // rebuild the DB before each method
    dbBuilder.rebuildAll();

    // generate test data
    testDataGen.generateData();
  }
Пример #2
0
  @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();
  }
Пример #3
0
  @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();
  }