View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transformer.wire;
8   
9   import org.mule.api.transformer.wire.WireFormat;
10  import org.mule.transformer.simple.ByteArrayToMuleMessage;
11  import org.mule.transformer.simple.MuleMessageToByteArray;
12  
13  import static org.junit.Assert.assertEquals;
14  
15  public class SerializedMuleMessageWireFormatTestCase extends AbstractMuleMessageWireFormatTestCase
16  {
17  
18      protected WireFormat getWireFormat() throws Exception
19      {
20          return createObject(SerializedMuleMessageWireFormat.class);
21      }
22  
23      public void testGetDefaultInboundTransformer() throws Exception
24      {
25          SerializedMuleMessageWireFormat wireFormat = (SerializedMuleMessageWireFormat) getWireFormat();
26          assertEquals(ByteArrayToMuleMessage.class, wireFormat.getInboundTransformer().getClass());
27      }
28  
29      public void testGetDefaultOutboundTransformer() throws Exception
30      {
31          SerializedMuleMessageWireFormat wireFormat = (SerializedMuleMessageWireFormat) getWireFormat();
32          assertEquals(MuleMessageToByteArray.class, wireFormat.getOutboundTransformer().getClass());
33      }
34  
35  }