public void PluginRuntimeHandler_GetNamespaces_WhenValidDll_ExpectNamespaces() { //------------Setup for test-------------------------- var source = CreatePluginSource(); //------------Execute Test--------------------------- using (Isolated <ComPluginRuntimeHandler> isolated = new Isolated <ComPluginRuntimeHandler>()) { var result = ComPluginServiceExecutionFactory.GetNamespaces(source); //------------Assert Results------------------------- Assert.IsTrue(result.Count > 0); } }
public void ListMethods_GivenAdodbConnection_ShouldContainOpen() { //---------------Set up test pack------------------- const string adodbConGuid = ComPluginRuntimeHandlerTest.adodbConnectionClassId; //---------------Assert Precondition---------------- //---------------Execute Test ---------------------- var ns = ComPluginServiceExecutionFactory.GetNamespaces(new ComPluginSource { ClsId = adodbConGuid }); Assert.IsNotNull(ns); var result = ComPluginServiceExecutionFactory.GetMethods(adodbConGuid, true); //------------Assert Results------------------------- var openMethod = result.First(method => method.Name.ToUpper() == "open".ToUpper()); //---------------Test Result ----------------------- Assert.IsNotNull(openMethod); }
public void PluginRuntimeHandler_GetNamespaces_WhenNullDll_ExpectException() { //------------Execute Test--------------------------- ComPluginServiceExecutionFactory.GetNamespaces(null); }