public void TestAddAssembly() { IPluginHelperService pluginServices = UnitTestHelper.GetPluginServices(); Assembly current = Assembly.GetExecutingAssembly(); DynamicLoadResult loadResult = pluginServices.AddAssembly(current); Assert.IsTrue(loadResult == DynamicLoadResult.Success); pluginServices.PluginLoaded(System.IO.Path.GetFileName(current.Location), out int version); Assert.IsTrue(version == 1); }
public void TestAddAssembly() { using (TestPluginManager pluginManager = new TestPluginManager()) { IPluginHelperService pluginServices = new PluginServices(pluginManager) as IPluginHelperService; Assert.IsNotNull(pluginServices); Assembly current = Assembly.GetExecutingAssembly(); DynamicLoadResult loadResult = pluginServices.AddAssembly(current); Assert.IsTrue(loadResult == DynamicLoadResult.Success); pluginServices.PluginLoaded(System.IO.Path.GetFileName(current.Location), out int version); Assert.IsTrue(version == 1); } }