1   /*
2    * $Id: ObjectToStringWithCollectionTestCase.java 10787 2008-02-12 18:51:50Z dfeist $
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.transformer.simple;
12  
13  import org.mule.api.transformer.Transformer;
14  import org.mule.transformer.AbstractTransformerTestCase;
15  
16  import java.util.ArrayList;
17  import java.util.List;
18  
19  public class ObjectToStringWithCollectionTestCase extends AbstractTransformerTestCase
20  {
21  
22      public Transformer getTransformer() throws Exception
23      {
24          return new ObjectToString();
25      }
26  
27      public Object getTestData()
28      {
29          List list = new ArrayList();
30          list.add("one");
31          list.add(null);
32          list.add("three");
33          return list;
34      }
35  
36      public Object getResultData()
37      {
38          return "[one, null, three]";
39      }
40  
41      public Transformer getRoundTripTransformer() throws Exception
42      {
43          // we do not want round trip transforming tested
44          return null;
45      }
46  
47  }
48  
49