db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/test/org/apache/ojb/broker/metadata PersistentFieldTest.java
Date Sun, 27 Jun 2004 23:49:35 GMT
arminw      2004/06/27 16:49:35

  Modified:    src/test/org/apache/ojb/broker/metadata
                        PersistentFieldTest.java
  Log:
  more tests
  
  Revision  Changes    Path
  1.8       +35 -1     db-ojb/src/test/org/apache/ojb/broker/metadata/PersistentFieldTest.java
  
  Index: PersistentFieldTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/metadata/PersistentFieldTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PersistentFieldTest.java	27 Jun 2004 23:36:23 -0000	1.7
  +++ PersistentFieldTest.java	27 Jun 2004 23:49:35 -0000	1.8
  @@ -297,6 +297,40 @@
           assertEquals("XXXX", result);
       }
   
  +    public void testAutoProxyWithDyna() throws Exception
  +    {
  +        DynaClass dynaClass = createDynaClass();
  +        DynaBean bean = dynaClass.newInstance();
  +        bean.set("name", "testDynaBean");
  +
  +        PersistentField pf = new PersistentFieldAutoProxyImpl(String.class, "name");
  +        String result = (String) pf.get(bean);
  +        assertNotNull(result);
  +        assertEquals("testDynaBean", result);
  +
  +        pf.set(bean, "XXXX");
  +        result = (String) pf.get(bean);
  +        assertNotNull(result);
  +        assertEquals("XXXX", result);
  +    }
  +
  +    public void testAutoProxyWithDynaNew() throws Exception
  +    {
  +        DynaClass dynaClass = createDynaClass();
  +        DynaBean bean = dynaClass.newInstance();
  +        bean.set("name", "testDynaBean");
  +
  +        PersistentField pf = new PersistentFieldAutoProxyImplNew(String.class, "name");
  +        String result = (String) pf.get(bean);
  +        assertNotNull(result);
  +        assertEquals("testDynaBean", result);
  +
  +        pf.set(bean, "XXXX");
  +        result = (String) pf.get(bean);
  +        assertNotNull(result);
  +        assertEquals("XXXX", result);
  +    }
  +
   
   
       //************************************************************************
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message