Esempio n. 1
0
        public void TestLoading()
        {
            var pluginManager = new PluginManager(new EventBus());
            var testPlugin    = new TestPlugin();

            pluginManager.LoadPlugin(testPlugin);

            Assert.Single(pluginManager.Plugins);
        }
Esempio n. 2
0
        public void TestPreInitialization()
        {
            var pluginManager = new PluginManager(new EventBus());
            var testPlugin    = new TestPlugin();

            pluginManager.LoadPlugin(testPlugin);
            pluginManager.PreInitializePlugins();

            var loadedPlugin = pluginManager.Plugins[0] as TestPlugin;

            Assert.True(loadedPlugin.PreInitialized);
        }