Пример #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.");
 }
 //    @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
 @BeforeClass
 public static void setUpClass() throws Exception {
   properties = new HashMap<Object, Object>();
   properties.put(EJBContainer.APP_NAME, "GestionProjet");
   container = javax.ejb.embeddable.EJBContainer.createEJBContainer(properties);
   instanceTacheEJB =
       (TacheEJB) container.getContext().lookup("java:global/GestionProjet/classes/TacheEJB");
   instanceProjetEJB =
       (ProjetEJB) container.getContext().lookup("java:global/GestionProjet/classes/ProjetEJB");
   collection = new ArrayList<Tache>();
   collection.add(
       instanceTacheEJB.creerTache(
           "4",
           "",
           ImportanceEnum.IMPORTANT,
           instanceProjetEJB.creerProjet("Projet 6", "description")));
   id = instanceTacheEJB.getTache("4").getId();
   tache = instanceTacheEJB.getTache("4");
 }
 @BeforeClass
 public static void setUpClass() {
   container = javax.ejb.embeddable.EJBContainer.createEJBContainer();
 }