public Run ( |
||
setupInfo | The setup information. | |
return | object |
public void PluginRuntimeHandler_Run_WhenNullParameters_ExpectException() { //------------Setup for test-------------------------- var svc = CreatePluginService(); var source = CreatePluginSource(); var pluginRuntimeHandler = new PluginRuntimeHandler(); PluginInvokeArgs args = new PluginInvokeArgs { AssemblyLocation = source.AssemblyLocation, AssemblyName = "Foo", Fullname = svc.Namespace, Method = svc.Method.Name, Parameters = null }; //------------Execute Test--------------------------- pluginRuntimeHandler.Run(args); }
public void PluginRuntimeHandler_Run_WhenValidLocation_ExpectResult() { //------------Setup for test-------------------------- var svc = CreatePluginService(); var source = CreatePluginSource(); var pluginRuntimeHandler = new PluginRuntimeHandler(); PluginInvokeArgs args = new PluginInvokeArgs { AssemblyLocation = source.AssemblyLocation, AssemblyName = "Foo", Fullname = svc.Namespace, Method = svc.Method.Name, Parameters = svc.Method.Parameters }; //------------Execute Test--------------------------- var result = pluginRuntimeHandler.Run(args); var castResult = result as DummyClassForPluginTest; //------------Assert Results------------------------- if(castResult != null) { StringAssert.Contains(castResult.Name, "test data"); } else { Assert.Fail("Failed Conversion for Assert"); } }