View Javadoc

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