View Javadoc

1   /*
2    * $Id: SerializedMuleMessageWireFormatTestCase.java 22377 2011-07-11 12:41:42Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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.wire;
12  
13  import org.mule.api.transformer.wire.WireFormat;
14  import org.mule.transformer.simple.ByteArrayToMuleMessage;
15  import org.mule.transformer.simple.MuleMessageToByteArray;
16  
17  import static org.junit.Assert.assertEquals;
18  
19  public class SerializedMuleMessageWireFormatTestCase extends AbstractMuleMessageWireFormatTestCase
20  {
21  
22      protected WireFormat getWireFormat() throws Exception
23      {
24          return createObject(SerializedMuleMessageWireFormat.class);
25      }
26  
27      public void testGetDefaultInboundTransformer() throws Exception
28      {
29          SerializedMuleMessageWireFormat wireFormat = (SerializedMuleMessageWireFormat) getWireFormat();
30          assertEquals(ByteArrayToMuleMessage.class, wireFormat.getInboundTransformer().getClass());
31      }
32  
33      public void testGetDefaultOutboundTransformer() throws Exception
34      {
35          SerializedMuleMessageWireFormat wireFormat = (SerializedMuleMessageWireFormat) getWireFormat();
36          assertEquals(MuleMessageToByteArray.class, wireFormat.getOutboundTransformer().getClass());
37      }
38  
39  }