0

I'm trying to verifiy certain properites of my Connector in a test. You can't do this:

 Object c =  registry.lookupConnector("myDevkitCon"); 

because the connector has a different type from normal connector, ie the internal mule code expects a Connector type but in our case a myDevkitConConnectorConnectionManager is returned.

4

1 回答 1

1

DevKit 生成包装连接器的类,以便向其添加某些属性。一是连接池。

这意味着,如果您想要一个连接器的实例,您必须:

  • 实例化myDevkitConConnectorConnectionManager
  • 调用其上的相关设置器进行配置
  • 称呼initialise()
  • 称呼acquireConnection()

顺便说一句,这又回到了您的另一个问题让功能单元测试等到连接 devkit 连接器希望您现在更好地理解我的答案。

于 2013-07-10T16:03:10.517 回答