ITest ApiSimulate Plugin Invocation Method
Invoke a plugin method. This method cannot work with legacy plugins.
Definition
Namespace: Casewhere.Runtime.DSL.Api
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
Return the PluginTestScenario object with predefined plugin result
Assembly: Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.9.8.6
C#
PluginTestScenario SimulatePluginInvocation(
string pluginName,
string methodName
)Parameters
Return Value
PluginTestScenarioReturn the PluginTestScenario object with predefined plugin result
Example
C#
var 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);