User: dsundstrom
  Date: 02/01/28 13:47:10

  Modified:    src/main/org/jboss/test/cmp2/ejbselect ABean.java AHome.java
                        EJBSelectUnitTestCase.java
  Log:
  Added a simple test which calls an ejbSelect method from an ejbHome method.
  
  Revision  Changes    Path
  1.2       +4 -0      jbosstest/src/main/org/jboss/test/cmp2/ejbselect/ABean.java
  
  Index: ABean.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cmp2/ejbselect/ABean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ABean.java        2001/12/21 18:44:05     1.1
  +++ ABean.java        2002/01/28 21:47:10     1.2
  @@ -30,6 +30,10 @@
         return ejbSelectSomeBs((A)ctx.getEJBLocalObject());
      }
   
  +   public Collection ejbHomeGetSomeBs(A a) throws FinderException {
  +      return ejbSelectSomeBs(a);
  +   }
  +
      public void setEntityContext(EntityContext ctx) { 
         this.ctx = ctx;
      }
  
  
  
  1.2       +2 -0      jbosstest/src/main/org/jboss/test/cmp2/ejbselect/AHome.java
  
  Index: AHome.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cmp2/ejbselect/AHome.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AHome.java        2001/12/21 18:44:05     1.1
  +++ AHome.java        2002/01/28 21:47:10     1.2
  @@ -3,6 +3,7 @@
   import javax.ejb.EJBLocalHome;
   import javax.ejb.CreateException;
   import javax.ejb.FinderException;
  +import java.util.Collection;
   
   public interface AHome extends EJBLocalHome {
   
  @@ -10,4 +11,5 @@
   
       public A findByPrimaryKey(String id) throws FinderException;
   
  +    public Collection getSomeBs(A a) throws FinderException;
   }
  
  
  
  1.3       +11 -0     
jbosstest/src/main/org/jboss/test/cmp2/ejbselect/EJBSelectUnitTestCase.java
  
  Index: EJBSelectUnitTestCase.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cmp2/ejbselect/EJBSelectUnitTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EJBSelectUnitTestCase.java        2002/01/16 00:05:04     1.2
  +++ EJBSelectUnitTestCase.java        2002/01/28 21:47:10     1.3
  @@ -75,6 +75,17 @@
         }
      }
   
  +   public void testEJBSelectFromEJBHomeMethod() throws Exception {
  +      AHome ahome = getAHome();
  +      Iterator i = ahome.getSomeBs(a).iterator();
  +      while(i.hasNext()) {
  +         Object obj = i.next();
  +         assertTrue(obj instanceof B);
  +         B b = (B) obj;
  +         b.getName();
  +      }
  +   }
  +
      public void tearDownEJB() throws Exception {
         a.remove();
      }
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to