1   /*
2    * $Id: VMMessageReceiverTestCase.java 10961 2008-02-22 19:01:02Z dfeist $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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  
20      VMMessageReceiver receiver;
21  
22      protected void doSetUp() throws Exception
23      {
24          super.doSetUp();
25          receiver = new VMMessageReceiver(endpoint.getConnector(), service, endpoint);
26      }
27  
28      /*
29       * (non-Javadoc)
30       * 
31       * @see org.mule.tck.providers.AbstractMessageReceiverTestCase#getMessageReceiver()
32       */
33      public MessageReceiver getMessageReceiver()
34      {
35          return receiver;
36      }
37  
38      public InboundEndpoint getEndpoint() throws Exception
39      {
40          return muleContext.getRegistry().lookupEndpointFactory().getInboundEndpoint("vm://test");
41      }
42  }