1   /*
2    * $Id: XsltTransformerUTF8TestCase.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.xml;
12  
13  import org.mule.umo.transformer.UMOTransformer;
14  import org.mule.util.IOUtils;
15  
16  public class XsltTransformerUTF8TestCase extends AbstractXmlTransformerTestCase
17  {
18  
19      private String srcData;
20      private String resultData;
21  
22      // @Override
23      protected void doSetUp() throws Exception
24      {
25          srcData = IOUtils.toString(IOUtils.getResourceAsStream("cdcatalog-utf-8.xml", getClass()), "UTF-8");
26          resultData = IOUtils.toString(IOUtils.getResourceAsStream("cdcatalog-utf-8.html", getClass()),
27              "UTF-8");
28      }
29  
30      public UMOTransformer getTransformer() throws Exception
31      {
32          XsltTransformer transformer = new XsltTransformer();
33          transformer.setXslFile("cdcatalog.xsl");
34          transformer.initialise();
35          return transformer;
36      }
37  
38      public UMOTransformer getRoundTripTransformer() throws Exception
39      {
40          return null;
41      }
42  
43      // @Override
44      public void testRoundtripTransform() throws Exception
45      {
46          // disable this test
47      }
48  
49      public Object getTestData()
50      {
51          return srcData;
52      }
53  
54      public Object getResultData()
55      {
56          return resultData;
57      }
58  
59  }