1 /* 2 * $Id: XmppFunctionalTestCase.java 19191 2010-08-25 21:05:23Z tcarlson $ 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.xmpp; 12 13 import org.mule.api.MuleMessage; 14 import org.mule.module.client.MuleClient; 15 import org.mule.transport.NullPayload; 16 17 public class XmppFunctionalTestCase extends XmppEnableDisableTestCase 18 { 19 @Override 20 protected String getConfigResources() 21 { 22 return "xmpp-functional-config.xml"; 23 } 24 25 // public void testDispatchNormalMessage() throws Exception 26 // { 27 // MuleClient client = new MuleClient(muleContext); 28 // Map<String, String> messageProperties = new HashMap<String, String>(); 29 // messageProperties.put(XmppConnector.XMPP_SUBJECT, "da subject"); 30 // client.dispatch("vm://in", TEST_MESSAGE, messageProperties); 31 // 32 // Thread.sleep(10000); 33 // } 34 35 // public void testSendNormalMessage() throws Exception 36 // { 37 // MuleClient client = new MuleClient(muleContext); 38 // MuleMessage result = client.send("vm://in", TEST_MESSAGE, null); 39 // assertNotNull(result); 40 // assertFalse(result.getPayload() instanceof NullPayload); 41 // } 42 43 // public void testDispatchChat() throws Exception 44 // { 45 // MuleClient client = new MuleClient(muleContext); 46 // client.dispatch("vm://in", TEST_MESSAGE, null); 47 // 48 // Thread.sleep(10000); 49 // } 50 51 public void testSendChat() throws Exception 52 { 53 MuleClient client = new MuleClient(muleContext); 54 MuleMessage result = client.send("vm://in", TEST_MESSAGE, null); 55 assertNotNull(result); 56 assertFalse(result.getPayload() instanceof NullPayload); 57 } 58 }