View Javadoc

1   /*
2    * $Id: VMMessageReceiverTestCase.java 20385 2010-11-29 20:25:26Z dfeist $
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.transport.vm;
12  
13  import org.mule.api.endpoint.InboundEndpoint;
14  import org.mule.api.transport.MessageReceiver;
15  import org.mule.transport.AbstractMessageReceiverTestCase;
16  
17  public class VMMessageReceiverTestCase extends AbstractMessageReceiverTestCase
18  {
19      VMMessageReceiver receiver;
20  
21      @Override
22      protected void doSetUp() throws Exception
23      {
24          super.doSetUp();
25          receiver = new VMMessageReceiver(endpoint.getConnector(), service, endpoint);
26      }
27  
28      @Override
29      public MessageReceiver getMessageReceiver()
30      {
31          return receiver;
32      }
33  
34      @Override
35      public InboundEndpoint getEndpoint() throws Exception
36      {
37          return muleContext.getEndpointFactory().getInboundEndpoint("vm://test");
38      }
39  }