1   /*
2    * $Id: XmlObjectTransformersTestCase.java 7963 2007-08-21 08:53:15Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.transformers.xml;
12  
13  import org.mule.tck.testmodels.fruit.Apple;
14  import org.mule.umo.transformer.UMOTransformer;
15  
16  public class XmlObjectTransformersTestCase extends AbstractXmlTransformerTestCase
17  {
18      private Apple testObject = null;
19  
20      public XmlObjectTransformersTestCase()
21      {
22          testObject = new Apple();
23          testObject.wash();
24      }
25  
26      public UMOTransformer getTransformer() throws Exception
27      {
28          return new ObjectToXml();
29      }
30  
31      public UMOTransformer getRoundTripTransformer() throws Exception
32      {
33          return new XmlToObject();
34      }
35  
36      public Object getTestData()
37      {
38          return testObject;
39      }
40  
41      public Object getResultData()
42      {
43          return "<org.mule.tck.testmodels.fruit.Apple>\n" + "  <bitten>false</bitten>\n"
44                 + "  <washed>true</washed>\n" + "</org.mule.tck.testmodels.fruit.Apple>";
45      }
46  }