public void Should_Load_Plugins() { IPluginManager pluginManager = new PluginManager(); IAllocationDefinition definition = ConvertToDefinition( _DB.PluginInfo_GetAll(), 2 ); pluginManager.Install( definition ); foreach( IPluginInfo plugin in definition ) { Assert.IsTrue( pluginManager.IsAssemblyLoaded(plugin.AssemblyIdentifier ) ); Assert.IsTrue( pluginManager.IsPluginLoaded(plugin.PluginIdentifier ) ); } }
public void Should_Return_False_If_Assembly_Isnt_Loaded() { IPluginManager pluginManager = new PluginManager(); Assert.IsFalse( pluginManager.IsAssemblyLoaded( "This.Assembly.Doesnt.Exist" ) ); }
public void Should_Return_True_If_Assembly_Is_Loaded() { IPluginManager pluginManager = new PluginManager(); IAllocationDefinition definition = ConvertToDefinition(_DB.PluginInfo_GetAll(), 2); IPluginInfo myPlugin = null; pluginManager.Install( definition ); foreach( IPluginInfo plugin in _DB.PluginInfo_GetAll() ) { myPlugin = plugin; break; } Assert.IsTrue( pluginManager.IsAssemblyLoaded( myPlugin.AssemblyIdentifier ) ); }