示例#1
0
 @Override
 protected void tearDown() throws Exception {
   reloadMembers();
   TestObjectFactory.removeObject(fund);
   TestObjectFactory.removeObject(fundBO);
   StaticHibernateUtil.closeSession();
   super.tearDown();
 }
 @After
 public void tearDown() throws Exception {
   savings = null;
   group = null;
   center = null;
   TestObjectFactory.removeObject(savingsOffering2);
   StaticHibernateUtil.flushSession();
 }
 public void testGetAllSavingsProductsFailure() throws Exception {
   SavingsOfferingBO savingsOffering = createSavingsOfferingBO();
   TestObjectFactory.simulateInvalidConnection();
   try {
     new SavingsPrdBusinessService().getAllSavingsProducts();
     Assert.assertTrue(false);
   } catch (ServiceException e) {
     Assert.assertTrue(true);
     StaticHibernateUtil.closeSession();
     TestObjectFactory.removeObject(savingsOffering);
   }
 }
 public void testGetAllSavingsProducts() throws Exception {
   SavingsOfferingBO savingsOffering = createSavingsOfferingBO();
   Assert.assertEquals(1, new SavingsPrdBusinessService().getAllSavingsProducts().size());
   TestObjectFactory.removeObject(savingsOffering);
 }