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.ByteArrayToSerializable;
11  import org.mule.transformer.simple.SerializableToByteArray;
12  
13  import org.junit.Test;
14  
15  import static org.junit.Assert.assertEquals;
16  
17  public class SerializationWireFormatTestCase extends AbstractWireFormatTestCase
18  {
19  
20      protected WireFormat getWireFormat() throws Exception
21      {
22          return createObject(SerializationWireFormat.class);
23      }
24  
25      @Test
26      public void testGetDefaultInboundTransformer()
27      {
28          SerializationWireFormat wireFormat = new SerializationWireFormat();
29          assertEquals(ByteArrayToSerializable.class, wireFormat.getInboundTransformer().getClass());
30      }
31  
32      @Test
33      public void testGetDefaultOutboundTransformer()
34      {
35          SerializationWireFormat wireFormat = new SerializationWireFormat();
36          assertEquals(SerializableToByteArray.class, wireFormat.getOutboundTransformer().getClass());
37      }
38  
39  }