1   /*
2    * $Id: XMLEntityTransformersTestCase.java 7976 2007-08-21 14:26:13Z 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.codec;
12  
13  import org.mule.tck.AbstractTransformerTestCase;
14  import org.mule.umo.transformer.UMOTransformer;
15  
16  public class XMLEntityTransformersTestCase extends AbstractTransformerTestCase
17  {
18  
19      public Object getResultData()
20      {
21          return "<?xml version="1.0" encoding="utf-8"?><string xmlns="http://www.webserviceX.NET/"><StockQuotes><Stock><Symbol>IBM</Symbol><Last>91.52</Last><Date>11/3/2006</Date><Time>11:10am</Time><Change>-0.16</Change><Open>91.76</Open><High>92.34</High><Low>91.43</Low><Volume>1856600</Volume><MktCap>139.3B</MktCap><PreviousClose>91.68</PreviousClose><PercentageChange>-0.17%</PercentageChange><AnnRange>72.73 - 92.68</AnnRange><Earns>5.815</Earns><P-E>15.77</P-E><Name>INTL BUSINESS MAC</Name></Stock></StockQuotes></string>";
22      }
23  
24      public Object getTestData()
25      {
26          return "<?xml version=\"1.0\" encoding=\"utf-8\"?><string xmlns=\"http://www.webserviceX.NET/\"><StockQuotes><Stock><Symbol>IBM</Symbol><Last>91.52</Last><Date>11/3/2006</Date><Time>11:10am</Time><Change>-0.16</Change><Open>91.76</Open><High>92.34</High><Low>91.43</Low><Volume>1856600</Volume><MktCap>139.3B</MktCap><PreviousClose>91.68</PreviousClose><PercentageChange>-0.17%</PercentageChange><AnnRange>72.73 - 92.68</AnnRange><Earns>5.815</Earns><P-E>15.77</P-E><Name>INTL BUSINESS MAC</Name></Stock></StockQuotes></string>";
27      }
28  
29      public UMOTransformer getTransformer()
30      {
31          return new XmlEntityEncoder();
32      }
33  
34      public UMOTransformer getRoundTripTransformer()
35      {
36          return new XmlEntityDecoder();
37      }
38  
39  }