コード例 #1
0
 /** Test of getDoctorByPersonId method, of class DoctorFacade. */
 @Test
 public void testGetDoctorByPersonId() throws Exception {
   System.out.println("getDoctorByPersonId");
   Object personId = 954;
   EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
   DoctorFacade instance =
       (DoctorFacade) container.getContext().lookup("java:global/classes/DoctorFacade");
   Doctor expResult = new Doctor(954);
   Doctor result = instance.getDoctorByPersonId(personId);
   assertEquals(expResult, result);
   container.close();
 }
コード例 #2
0
 /** Test of remove method, of class PaseoFacade. */
 @Test
 public void testRemove() throws Exception {
   System.out.println("remove");
   Paseo entity = null;
   EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
   PaseoFacade instance =
       (PaseoFacade) container.getContext().lookup("java:global/classes/PaseoFacade");
   instance.remove(entity);
   container.close();
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #3
0
 //    @Test
 public void testRemoveEjercicio_int() throws Exception {
   System.out.println("removeEjercicio");
   int idEjercicio = 0;
   EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
   EjercicioSession instance =
       (EjercicioSession) container.getContext().lookup("java:global/classes/EjercicioSession");
   boolean expResult = false;
   boolean result = instance.removeEjercicio(idEjercicio);
   assertEquals(expResult, result);
   container.close();
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #4
0
 /** Test of getAll method, of class RuleBL. */
 @Test
 public void testGetAll() throws Exception {
   System.out.println("getAll");
   EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
   RuleBLRemote instance =
       (RuleBLRemote) container.getContext().lookup("java:global/classes/RuleBL");
   List expResult = null;
   List result = instance.getAll();
   assertEquals(expResult, result);
   container.close();
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #5
0
 /** Test of count method, of class PaseoFacade. */
 @Test
 public void testCount() throws Exception {
   System.out.println("count");
   EJBContainer container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
   PaseoFacade instance =
       (PaseoFacade) container.getContext().lookup("java:global/classes/PaseoFacade");
   int expResult = 0;
   int result = instance.count();
   assertEquals(expResult, result);
   container.close();
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #6
0
 @AfterClass
 public static void close() throws Exception {
   if (container != null) {
     container.close();
   }
 }
コード例 #7
0
 @AfterClass
 public static void tearDownClass() {
   container.close();
 }
コード例 #8
0
 @AfterClass
 public static void tearDownClass() throws Exception {
   container.close();
 }
コード例 #9
0
 @AfterClass
 public static void close() {
   if (container != null) {
     container.close();
   }
 }
コード例 #10
0
 @AfterClass
 public static void closeContainer() throws Exception {
   if (ctx != null) ctx.close();
   if (ec != null) ec.close();
 }
コード例 #11
0
 @After
 public void tearDown() {
   if (ejbContainer != null) {
     ejbContainer.close();
   }
 }
コード例 #12
0
ファイル: BaseTestEJB.java プロジェクト: yano2h/TESIS
 @AfterClass
 public static void tearDownClass() throws Exception {
   container.close();
   FileUtils.cleanDirectory(new File(TARGET_DIR));
 }
コード例 #13
0
 @AfterClass
 public static void afterClass() {
   ejbContainer.close();
 }