Exemple #1
0
        public void TestLoadingAndConfigurating()
        {
            IEnumerable <IPluginConfigurator> plugins = PluginFinder.GetConfigurators(Assembly.GetAssembly(typeof(PluginFixture)));

            Assert.AreEqual(2, plugins.Count());

            IPluginConfigurator plugin1 = plugins.ElementAt(0);
            IPluginConfigurator plugin2 = plugins.ElementAt(1);

            Assert.IsInstanceOf <GenericPluginConfigurator <TestPlugin1> >(plugin1);
            Assert.IsInstanceOf <TestPluginConfiguratorB>(plugin2);

            Assert.AreEqual("Plugin A", plugin1.Name);
            Assert.AreEqual("Plugin B", plugin2.Name);
            Assert.AreEqual("Plugs into A", plugin1.Description);
            Assert.AreEqual("Plugs into B", plugin2.Description);
        }
Exemple #2
0
 public EditPluginViewModel(IPluginConfigurator pluginConfigurator, IUserNotifyer notifyer)
 {
     _notifyer           = notifyer;
     _pluginConfigurator = pluginConfigurator;
 }