ITestApiSimulatePluginInvocation Method
|
Invoke a plugin method. This method cannot work with legacy plugins.
Namespace: Casewhere.Runtime.DSL.ApiAssembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.5.0
SyntaxPluginTestScenario SimulatePluginInvocation(
string pluginName,
string methodName
)
Parameters
- pluginName String
- Name of the plugin.
- methodName String
- Invoked method name.
Return Value
PluginTestScenario
Return the PluginTestScenario object with predefined plugin result
Examplevar pluginResult = new PluginResult { Data = new Dictionary<string, object>() };
pluginResult.Data.Add("subject", "Test plugin on Dev env");
pluginResult.Data.Add("body", "Test plugin on Dev env");
var testApi = ctx.Use<ITestApi>();
testApi.SimulatePluginInvocation("CwMail", "SendEmail").Parameters(parms => parms["subject"].ToString() == "Test plugin on Dev env").Returns(pluginResult);
See Also