Package org.jboss.test.cmp2.enums.ejb

Examples of org.jboss.test.cmp2.enums.ejb.IDClass


   }

   public void testSelectColors() throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass[] ids = new IDClass[]{new IDClass(555), new IDClass(666), new IDClass(777)};

      try
      {
         facade.createChild(ids[0]);
         ColorEnum min = ColorEnum.RED.valueOf(0);
View Full Code Here


   }

   public void testSelectColor() throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(6);
      facade.createChild(childId);
      try
      {
         facade.setColor(childId, ColorEnum.RED);
         ColorEnum color = facade.selectColor(childId);
View Full Code Here

   public void testColorEnum()
      throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(1);
      facade.createChild(childId);
      assertTrue(ColorEnum.RED == facade.getColorForId(childId));
      facade.setColor(childId, ColorEnum.GREEN);
      assertTrue(ColorEnum.GREEN == facade.getColorForId(childId));
      facade.setColor(childId, ColorEnum.BLUE);
View Full Code Here

   public void testAnimalEnum()
      throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(2);
      facade.createChild(childId);
      assertTrue(AnimalEnum.PENGUIN == facade.getAnimalForId(childId));
      facade.setAnimal(childId, AnimalEnum.DOG);
      assertTrue(AnimalEnum.DOG == facade.getAnimalForId(childId));
      facade.setAnimal(childId, AnimalEnum.CAT);
View Full Code Here

   public void testFindByColor()
      throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(3);
      facade.createChild(childId);
      try
      {
         facade.setColor(childId, ColorEnum.BLUE);
         IDClass id = facade.findByColor(ColorEnum.BLUE);
         assertEquals(childId, id);
      }
      finally
      {
         facade.removeChild(childId);
View Full Code Here

   public void testFindAndOrderByColor()
      throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(3);
      facade.createChild(childId);
      try
      {
         facade.setColor(childId, ColorEnum.BLUE);
         IDClass id = facade.findAndOrderByColor(ColorEnum.BLUE);
         assertEquals(childId, id);
      }
      finally
      {
         facade.removeChild(childId);
View Full Code Here

   public void testFindByColorDeclaredSql()
      throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(4);
      facade.createChild(childId);
      try
      {
         facade.setColor(childId, ColorEnum.BLUE);
         IDClass id = facade.findByColorDeclaredSql(ColorEnum.BLUE);
         assertEquals(childId, id);
      }
      finally
      {
         facade.removeChild(childId);
View Full Code Here

   public void testLowColor()
      throws Exception
   {
      Facade facade = FacadeUtil.getHome().create();
      IDClass childId = new IDClass(3);
      facade.createChild(childId);
      try
      {
         facade.setColor(childId, ColorEnum.RED);
         List ids = facade.findLowColor(ColorEnum.BLUE);
View Full Code Here

   // Tests ---------------------------------------------------
   public void testStandaloneFKMapping() throws Exception
   {
      InstituteLocal institute = null;
      DepartmentLocal department = null;
      try {
         institute = getInstituteHome().create("NTUUKPI", "Natinal Technical University Of The Ukraine KPI");
         department = getDepartmentHome().create("KV", "Specialized Computer Systems");
         institute.getDepartments().add(department);
         assertTrue("department.getInstitute().isIdentical(institute)", department.getInstitute().isIdentical(institute));
         department.setInstitute(null);
         assertTrue("institute.getDepartments().isEmpty()", institute.getDepartments().isEmpty());
      } finally {
         removeEntity(institute);
         removeEntity(department);
      }
View Full Code Here

         removeEntity(department);
      }
   }

   public void testJoing() throws Exception {
      DepartmentLocal department = null;
      GroupLocal kv62Group = null;
      GroupLocal kv63Group = null;
      try {
         System.out.println("testJoin()");
         department = getDepartmentHome().create("KV", "Specialized Computer Systems");
View Full Code Here

TOP

Related Classes of org.jboss.test.cmp2.enums.ejb.IDClass

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.