Click or drag to resize

ITestApiSimulatePluginInvocation Method

Invoke a plugin method. This method cannot work with legacy plugins.

Namespace:  Casewhere.Runtime.DSL.Api
Assembly:  Casewhere.Runtime (in Casewhere.Runtime.dll) Version: 2.8.1.0
Syntax
C#
PluginTestScenario SimulatePluginInvocation(
	string pluginName,
	string methodName
)

Parameters

pluginName
Type: SystemString
Name of the plugin.
methodName
Type: SystemString
Invoked method name.

Return Value

Type: PluginTestScenario
Return the PluginTestScenario object with predefined plugin result
Examples
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);
See Also