功能测试在Anypoint中运行,但不在IntelliJ中运行

时间:2016-01-08 12:38:13

标签: mule

我有以下测试用例

public class TestTwo extends FunctionalTestCase {

    @Override
    protected String getConfigResources() {
        return "mule-conf.xml";
    }

    @Test
    public void testClient2PersonMigration() throws Exception {

        MuleClient client = muleContext.getClient();
        String payload = "someTextxxxx";
        Map<String, Object> messageProperties = null;
        MuleMessage result = client.send("vm://test", payload, messageProperties); //URL, Payload, MessageProperties

        assertNotNull(result);
        assertNull(result.getExceptionPayload());
        assertFalse(result.getPayload() instanceof NullPayload);
        assertEquals("Pass", result.getPayloadAsString()); //if I comment this it works
    }
}

并配置XML文件

  <flow name="simplejunittestFlow1" doc:name="simplejunittestFlow1">
        <inbound-endpoint address="vm://test" exchange-pattern="request-response" doc:name="Generic"/>
        <expression-transformer expression="#['Fail']"/>
        <flow-ref name="simplejunittestFlow2" doc:name="Flow Reference"/>
    </flow>
    <sub-flow name="simplejunittestFlow2" doc:name="simplejunittestFlow2">
        <expression-transformer expression="#['Pass']"/>
    </sub-flow>

此测试使用Mule 3.3在Anypoint Studio中运行并传递,但在使用IntellIj和Mule 3.2时,它会抱怨以下错误

  

引起:org.mule.api.transport.NoReceiverForEndpointException:   连接器上没有注册接收器   &#34; connector.VM.mule.default&#34; for endpointUri vm:// test

任何人都知道为什么测试运行并在Anypoint中传递良好但无法在IntelliJ中运行?

0 个答案:

没有答案