--- On Sat, 2/13/10, Scott Gray <[email protected]> wrote:
> From: Scott Gray <[email protected]>
> Subject: Re: svn commit: r909858 - 
> /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
> To: [email protected]
> Date: Saturday, February 13, 2010, 9:53 AM
> 
> On 13/02/2010, at 10:45 AM, [email protected]
> wrote:
> 
> > Author: adrianc
> > Date: Sat Feb 13 17:45:11 2010
> > New Revision: 909858
> > 
> > URL: http://svn.apache.org/viewvc?rev=909858&view=rev
> > Log:
> > Test XStream serialization/deserialization of
> GenericValue.
> > 
> > Modified:
> >   
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
> > 
> > Modified:
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
> > URL: 
> > http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java?rev=909858&r1=909857&r2=909858&view=diff
> >
> ==============================================================================
> > ---
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
> (original)
> > +++
> ofbiz/trunk/framework/entity/src/org/ofbiz/entity/test/EntityTestSuite.java
> Sat Feb 13 17:45:11 2010
> > @@ -29,6 +29,9 @@
> > import org.ofbiz.base.util.Debug;
> > import org.ofbiz.base.util.UtilDateTime;
> > import org.ofbiz.base.util.UtilMisc;
> > +import org.ofbiz.base.util.UtilXml;
> > +import org.ofbiz.entity.Delegator;
> > +import org.ofbiz.entity.DelegatorFactory;
> > import org.ofbiz.entity.GenericEntity;
> > import org.ofbiz.entity.GenericEntityException;
> > import org.ofbiz.entity.GenericPK;
> > @@ -108,6 +111,31 @@
> >     }
> > 
> >     /*
> > +     * Tests XML serialization by
> serializing/deserializing a GenericValue
> > +     */
> > +    public void testXmlSerialization()
> throws Exception {
> > +        try {
> > +            // Must use
> the default delegator because the deserialized GenericValue
> can't
> > +            // find the
> randomized one.
> 
> Hi Adrian,
> 
> Could you clarify what you mean by this?

The test suite creates a testing delegator using a randomized delegator name. 
That testing delegator is created using a delegator method instead of the 
factory method. So, when the GenericValue is deserialized, it can't find the 
"NS29WP14" delegator that created the original GenericValue.

-Adrian




Reply via email to