public void AddPluginSourceCanOnlyAddOnce()
 {
     PluginRepository tested = new PluginRepository();
       MockPluginSource pluginSource = new MockPluginSource();
       tested.AddPluginSource(pluginSource);
       DoAssert.Throws<ArgumentException>(() => tested.AddPluginSource(pluginSource) );
 }
 public void AddPluginSourceShouldListenToAllEventsOnPluginSourceAfterAdd()
 {
     PluginRepository tested = new PluginRepository();
       MockPluginSource pluginSource = new MockPluginSource();
       tested.AddPluginSource(pluginSource);
       Assert.AreEqual(pluginSource.NumPluginAddedListeners, 1);
       Assert.AreEqual(pluginSource.NumPluginRemovedListeners, 1);
 }
Ejemplo n.º 3
0
 public void TieEvents(PluginRepository plugins)
 {
     plugins.CherryEvents.Subscribe(new CherryEventListener(
                                        "Load Configuration Event",
                                        cpea => this.LoadConfiguration(cpea as ConfigureEventArgs)));
     plugins.CherryEvents.Subscribe(new CherryEventListener(
                                        "Save Configuration Event",
                                        cpea => this.SaveConfiguration(cpea as ConfigureEventArgs)));
 }
 public PluginRegistrationHelper(IOrganizationService service, CIContext xrmContext, Action <string> logVerbose, Action <string> logWarning)
 {
     this.logVerbose                 = logVerbose;
     this.logWarning                 = logWarning;
     organizationService             = service;
     pluginRepository                = new PluginRepository(xrmContext);
     reflectionLoader                = new ReflectionLoader();
     pluginRegistrationObjectFactory = new PluginRegistrationObjectFactory();
 }
Ejemplo n.º 5
0
 public void TieEvents(PluginRepository plugins)
 {
     this.pluginRepository             = plugins;
     this.removeReminderCommand        = plugins.CherryCommands["Remove Existing Reminder"];
     this.addNewReminderCommand        = plugins.CherryCommands["Add New Reminder"];
     this.editReminderCommand          = plugins.CherryCommands["Edit Reminder"];
     this.getAllRemindersCommand       = plugins.CherryCommands["Get All Reminders"];
     this.getAllReminderPluginsCommand = plugins.CherryCommands["Get All Reminder Plugins"];
 }
Ejemplo n.º 6
0
        public void ShouldLogAsDebugWhenPluginSourceIsAdded()
        {
            PluginRepository tested = new PluginRepository();
            MockLog          log    = new MockLog(tested);
            var pluginSource        = new Mock <IPluginSource>().Object;

            tested.AddPluginSource(pluginSource);
            Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Debug && x.Message.Contains("added") && x.Message.Contains(pluginSource.GetType().FullName)));
        }
Ejemplo n.º 7
0
        public void ShouldLogToDebugOnPluginQuery()
        {
            PluginRepository tested = new PluginRepository();
            MockLog          log    = new MockLog(tested);
            PluginFilter     filter = PluginFilter.Create.IsNamed("plugin name").Implements(typeof(IMockPluginInterface1));

            tested.Plugins(filter);
            Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Debug && x.Message.Contains("Returning plugins for") && x.Message.Contains(filter.ToString())));
        }
Ejemplo n.º 8
0
        public static void LoadPluginRepo()
        {
            var request = UnityWebRequest.Get(RepoURL);

            request.Download(() =>
            {
                var json = request.downloadHandler.text;
                repo     = JsonUtility.FromJson <PluginRepository>(json);
            });
        }
        public override IReminder CreateDefaultReminder(PluginRepository pluginRepository)
        {
            var reminder = new IntervalReminder(pluginRepository)
            {
                FromInterval = new TimeSpan(0, 1, 50, 0),
                ToInterval   = new TimeSpan(0, 2, 10, 0),
            };

            return(reminder);
        }
Ejemplo n.º 10
0
        public void ShouldStopListeningToAllEventsOnPluginSourceAfterRemove()
        {
            PluginRepository tested       = new PluginRepository();
            MockPluginSource pluginSource = new MockPluginSource();

            tested.AddPluginSource(pluginSource);
            tested.RemovePluginSource(pluginSource);
            Assert.AreEqual(pluginSource.NumPluginAddedListeners, 0);
            Assert.AreEqual(pluginSource.NumPluginRemovedListeners, 0);
        }
Ejemplo n.º 11
0
 public void TieEvents(PluginRepository plugins)
 {
     plugins.CherryEvents.Subscribe("Application Started", this.StartCheck);
     plugins.CherryEvents.Subscribe(new CherryEventListener(
                                        "Load Configuration Event",
                                        ea => this.LoadConfig(ea as ConfigureEventArgs)));
     plugins.CherryEvents.Subscribe(new CherryEventListener(
                                        "Save Configuration Event",
                                        ea => this.SaveConfig(ea as ConfigureEventArgs)));
 }
Ejemplo n.º 12
0
        public void Setup()
        {
            _database   = Database.CreateInMemory(PluginRepository.CustomTypes);
            _repository = new PluginRepository(_database, newlyCreated: false);

            _users = _database.GetDictionary <string, User>("Users");
            _usernamesByAccessToken = _database.GetDictionary <Guid, string>("UsersByAccessToken");
            _plugins            = _database.GetDictionary <PluginIdentifier, byte[]>("Plugins");
            _pluginIcons        = _database.GetDictionary <PluginIdentifier, byte[]>("PluginIcons");
            _pluginRequirements = _database.GetDictionary <PluginIdentifier, PublishedPlugin>("PluginDescriptions");
        }
        public void FindPluginNameShouldReturnNullWhenPluginWasNotFound()
        {
            // Arrange
            var sut = new PluginRepository(System.Array.Empty <IBuildPlugin>(), System.Array.Empty <ISourceControlPlugin>(), System.Array.Empty <INotificationProcessor>(), new TypeMatcher());

            // Act
            var actual = sut.FindPluginName("typeName");

            // Assert
            Assert.Null(actual);
        }
Ejemplo n.º 14
0
        public async Task <List <DeParaBeneficiadorDto> > BeneficiadorDeParaGetAsync()
        {
            Dictionary <string, string> parameters = new Dictionary <string, string>();

            parameters.Add("idclient", _authentication.CurrentClient);
            parameters.Add("UserName", _authentication.userName);
            PluginRepository pluginRepository = new PluginRepository(_authentication, EndPointsAPI.ClientPlaceDeParaGet);
            var campos = await pluginRepository.Get <List <DeParaBeneficiadorDto> >(parameters);

            return(campos);
        }
        public void FindBuildPluginShouldReturnNullWhenPluginWasNotFound()
        {
            // Arrange
            var sut = new PluginRepository(System.Array.Empty <IBuildPlugin>(), System.Array.Empty <ISourceControlPlugin>(), System.Array.Empty <INotificationProcessor>(), Substitute.For <ITypeMatcher>());

            // Act
            var actual = sut.FindBuildPlugin("non.existing");

            // Assert
            Assert.Null(actual);
        }
 public void TieEvents(PluginRepository plugins)
 {
     this.pluginsRepository = plugins;
     this.showDialogCommand = plugins.CherryCommands["Show Window"];
     plugins.CherryEvents.Subscribe(
         "Application Started",
         () =>
     {
         this.reminderPlugins =
             plugins.CherryCommands["Get All Reminder Plugins"].Do(null) as ReminderPluginsRepository;
     });
 }
Ejemplo n.º 17
0
        public Reminder(PluginRepository plugins)
        {
            this.plugins = plugins;

            this.getCurrentTimeCommand            = plugins.CherryCommands["Get Current Time"];
            this.scheduleActionCommand            = plugins.CherryCommands["Schedule Single Action"];
            this.removeExistingTimeTriggerCommand = plugins.CherryCommands["Remove Existing Time Trigger"];

            this.CompositeNotification = new CompositeNotification(plugins);
            this.CompositeCondition    = new CompositeCondition(plugins);

            this.LastNotificationTime = this.Now;
        }
 public void TieEvents(PluginRepository plugins)
 {
     plugins.CherryEvents.Subscribe(new CherryEventListener(
                                        "Collect GUI Configurable Plugins",
                                        ea =>
     {
         var info = new GuiConfigurablePluginInfo(
             this.PluginName,
             new GeneralSettingsPanel(plugins),
             null);
         (ea as GuiConfigurablePluginEventArgs).GeneralSettingsInfo = info;
     }));
 }
Ejemplo n.º 19
0
        public void TieEvents(PluginRepository plugins)
        {
            plugins.CherryEvents.Subscribe("Pomodoro Started", this.StartPomodoroInternal);

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Pomodoro Finishing",
                                               ea => this.StopPomodoroInternal((ea as PomodoroEventArgs).PomodoroData.Successful)));

            plugins.CherryEvents.Subscribe("Application Started", this.renderer.Initialize);

            this.addNewTriggerCommand         = plugins.CherryCommands["Add New Time Trigger"];
            this.removeExistingTriggerCommand = plugins.CherryCommands["Remove Existing Time Trigger"];
        }
Ejemplo n.º 20
0
        public CompositeNotification(PluginRepository plugins, params INotification[] notifications)
        {
            this.notifiers = plugins.CherryCommands["Get All Notify Plugins"].Do(null) as NotifyPluginsRepository;

            foreach (var n in this.notifiers.All)
            {
                this.allNotifications[n.NotificationTypeName] = n.CreateNotification();
            }

            foreach (var notification in notifications)
            {
                this.allNotifications[notification.TypeName] = notification;
            }
        }
Ejemplo n.º 21
0
        public CompositeCondition(PluginRepository plugins, params ICondition[] conditions)
        {
            this.conditionPlugins = plugins.CherryCommands["Get All Condition Checker Plugins"].Do(null) as ConditionCheckerPluginsRepository;

            foreach (var n in this.conditionPlugins.All)
            {
                this.allConditions[n.ConditionTypeName] = n.CreateCondition();
            }

            foreach (var condition in conditions)
            {
                this.allConditions[condition.TypeName] = condition;
            }
        }
Ejemplo n.º 22
0
        public void TieEvents(PluginRepository plugins)
        {
            now           = plugins.CherryCommands["Get Current Time"];
            this.lastPoll = this.Now;

            plugins.CherryEvents.Subscribe("Pomodoro Started", this.StartPomodoroInternal);

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Pomodoro Finishing",
                                               ea => this.StopPomodoroInternal((ea as PomodoroEventArgs).PomodoroData)));

            this.addNewTriggerCommand         = plugins.CherryCommands["Add New Time Trigger"];
            this.removeExistingTriggerCommand = plugins.CherryCommands["Remove Existing Time Trigger"];
        }
Ejemplo n.º 23
0
        public async Task <bool> SaveInfoPlan(SalesDto salesDto)
        {
            try
            {
                PluginRepository pluginRepository = new PluginRepository(_authentication, EndPointsAPI.ClientFieldsGet);
                var campos = await pluginRepository.Post <SalesDto>(ListFieldsSalesDto.ListNameClassSalesDto(salesDto, salesDto.UserName, salesDto.CD_Cliente));

                return(true);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
Ejemplo n.º 24
0
 public ProcessImage(string bmpfilename)
 {
     FreeImageEngine.Message += new OutputMessageFunction(FreeImageEngine_Message);
     try
     {
         FreeImageBitmap fib  = new FreeImageBitmap(bmpfilename);
         FreeImagePlugin plug = PluginRepository.Plugin(fib.ImageFormat);
         ReplaceBitmap(fib);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        public void TieEvents(PluginRepository plugins)
        {
            plugins.CherryEvents.Subscribe("Pomodoro Started", this.StartPomodoroInternal);

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Pomodoro Finishing",
                                               ea => this.StopPomodoroInternal((ea as PomodoroEventArgs).PomodoroData.Successful)));

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Collect GUI Configurable Plugins",
                                               ea =>
            {
                var info = new GuiConfigurablePluginInfo(
                    this.PluginName,
                    new LiveMessengerSettingsPanel(this),
                    Helpers.LoadIcon("res://live.ico"));
                (ea as GuiConfigurablePluginEventArgs).PluginInfos.Add(info);
            }));

            plugins.CherryEvents.Subscribe(
                "Application Started",
                () =>
            {
                if (this.Enabled)
                {
                    this.TryConnect();
                }
            });

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Load Plugin Configuration Event",
                                               cpea => this.LoadConfiguration(cpea as ConfigurePluginEventArgs)));
            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Save Plugin Configuration Event",
                                               cpea => this.SaveConfiguration(cpea as ConfigurePluginEventArgs)));

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Pomodoro Minute Elapsed",
                                               cea =>
            {
                if (this.Enabled && this.IsConnected)
                {
                    SetMSNStatus(
                        true,
                        this.InPomodoroStatusCategory.ToString(),
                        string.Format(this.InPomodoroTextTemplate, (cea as PomodoroEventArgs).RunnigPomodoroData.MinutesLeft));
                }
            }));
        }
Ejemplo n.º 26
0
        public async Task <List <DetalheItemDto> > DetalhamentoDePartNumber(string[] PartNumbers, string CodCliente)
        {
            EmissaoPedidosDto emissaoPedidosDto = new EmissaoPedidosDto();

            emissaoPedidosDto.TipoBusca     = "P";
            emissaoPedidosDto.PartNumbers   = PartNumbers.ToList();
            emissaoPedidosDto.CodigoCliente = CodCliente;

            PluginRepository pluginRepository = new PluginRepository(_authentication, EndPointsAPI.ClientListaPartNumber);
            //string result = JsonConvert.SerializeObject(emissaoPedidosDto, Formatting.None);

            var list = await pluginRepository.PostJson(emissaoPedidosDto);

            return(Functions.ConvertJsonToListIdDescription <List <DetalheItemDto> >(list));
        }
Ejemplo n.º 27
0
        public void TieEvents(PluginRepository plugins)
        {
            plugins.CherryEvents.Subscribe("Pomodoro Started", this.StartPomodoroInternal);

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                "Pomodoro Finishing",
                ea => this.StopPomodoroInternal((ea as PomodoroEventArgs).PomodoroData.Successful)));

            plugins.CherryEvents.Subscribe(new CherryEventListener(
                "Load Plugin Configuration Event",
                cpea => this.LoadConfiguration(cpea as ConfigurePluginEventArgs)));
            plugins.CherryEvents.Subscribe(new CherryEventListener(
                "Save Plugin Configuration Event",
                cpea => this.SaveConfiguration(cpea as ConfigurePluginEventArgs)));
        }
Ejemplo n.º 28
0
        public void ShouldLogAsInfoOnPluginRemoved()
        {
            var mockPluginSource    = new Mock <IPluginSource>();
            PluginRepository tested = new PluginRepository();

            tested.AddPluginSource(mockPluginSource.Object);
            MockLog log = new MockLog(tested);

            mockPluginSource.Raise(x => x.PluginRemoved += null, new PluginEventArgs(MockPluginDescriptor.For <MockPlugin1>()));
            Assert.IsTrue(
                log.Any(
                    x => x.Level == MockLog.Level.Info &&
                    x.Message.Contains("Removed") &&
                    x.Message.Contains(typeof(MockPlugin1).FullName)));
        }
Ejemplo n.º 29
0
        private void Init()
        {
            AppDomain.CurrentDomain.AssemblyLoad += (s, e) => Console.WriteLine("{0} loaded {1}", AppDomain.CurrentDomain.FriendlyName, e.LoadedAssembly.FullName);

            Console.WriteLine("Creating plugin repository");
            this.pluginRepository  = new PluginRepository();
            this.assemblyContainer = new AssemblyContainer();
            this.pluginRepository.AddPluginSource(new PluginExtractor(this.assemblyContainer));

            DirectoryInfo pluginDir = new DirectoryInfo(@"..\..\..\Plugin\Bin");

            Console.WriteLine(@"Adding plugins from {0}", pluginDir.FullName);

            directoryWatcher = new PluginDirectory(pluginDir.FullName, true);
            this.assemblyContainer.AddDir(directoryWatcher);
        }
Ejemplo n.º 30
0
        public void TieEvents(PluginRepository plugins)
        {
            this.showNoActivateCommand = plugins.CherryCommands["Show Window No Activate"];
            plugins.CherryEvents.Subscribe(new CherryEventListener(
                                               "Pomodoro Finished",
                                               ea =>
            {
                var pomodoro = (ea as PomodoroEventArgs).PomodoroData;
                if (pomodoro.Successful)
                {
                    this.pomodoroEvaluationForm.SetData(pomodoro);
                    this.showNoActivateCommand.Do(new WindowCommandArgs(this.pomodoroEvaluationForm));
                }
            }));

            this.pomodoroEvaluationForm = new PomodoroEvaluationForm(plugins);
        }
Ejemplo n.º 31
0
        public async Task <bool> ValidaVersao()
        {
            decimal versaoAtual = decimal.Parse(ConfigurationManager.AppSettings["Version"]);

            PluginRepository pluginRepository = new PluginRepository(_authentication, EndPointsAPI.ControleVersao);

            var versao = await pluginRepository.Get <VersaoPluginDto>();

            if (versaoAtual >= versao.minimaVersao)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 32
0
 public JobFactoryService(ConfigService configService, RuriLibSettingsService settingsService, PluginRepository pluginRepo,
                          IHitRepository hitRepo, ProxySourceFactoryService proxySourceFactory, DataPoolFactoryService dataPoolFactory,
                          ProxyReloadService proxyReloadService, IRandomUAProvider randomUAProvider, IRNGProvider rngProvider, IJobLogger logger,
                          IProxyRepository proxyRepo)
 {
     this.configService      = configService;
     this.settingsService    = settingsService;
     this.pluginRepo         = pluginRepo;
     this.hitRepo            = hitRepo;
     this.proxySourceFactory = proxySourceFactory;
     this.dataPoolFactory    = dataPoolFactory;
     this.proxyReloadService = proxyReloadService;
     this.randomUAProvider   = randomUAProvider;
     this.rngProvider        = rngProvider;
     this.logger             = logger;
     this.proxyRepo          = proxyRepo;
 }
        public void Install(Castle.Windsor.IWindsorContainer container, Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store)
        {
            AssemblyContainer assemblyContainer = new AssemblyContainer();

              PluginRepository pluginRepository = new PluginRepository();
              pluginRepository.AddPluginSource(new PluginExtractor(assemblyContainer));

              System.Configuration.AppSettingsReader settingsReader = new AppSettingsReader();
              string pluginDir = settingsReader.GetValue("PluginPath", typeof(string)) as string;
              PluginDirectory pluginDirectory = new PluginDirectory(pluginDir, true);
              assemblyContainer.AddDir(pluginDirectory);

              container.Register(
            Component.For<IPluginRepository>().LifestyleSingleton().Instance(pluginRepository),

            Component.For<IAssemblyRepository>().LifestyleSingleton().Instance(assemblyContainer)
            .OnDestroy(kernel => { assemblyContainer.RemoveDir(pluginDirectory); pluginDirectory.Dispose(); })
              );
        }
        public void ForgetLostPlugins()
        {
            PluginRepository tested = new PluginRepository();
              MockPluginSource pluginSource = new MockPluginSource();
              tested.AddPluginSource(pluginSource);

              PluginDescriptor thePlugin = new PluginDescriptor()
              {
            QualifiedName = typeof(UnitTest_PluginRepository)
              };

              pluginSource.RaisePluginAdded(thePlugin);

              var pluginsBefore = tested.Plugins(null).ToArray();
              pluginSource.RaisePluginRemoved(thePlugin);
              var pluginsAfter = tested.Plugins(null).ToArray();

              Assert.IsTrue(pluginsAfter.Length - pluginsBefore.Length == -1);
              Assert.IsFalse(pluginsAfter.Contains(thePlugin));
        }
 public void ShouldStopListeningToAllEventsOnPluginSourceAfterRemove()
 {
     PluginRepository tested = new PluginRepository();
       MockPluginSource pluginSource = new MockPluginSource();
       tested.AddPluginSource(pluginSource);
       tested.RemovePluginSource(pluginSource);
       Assert.AreEqual(pluginSource.NumPluginAddedListeners, 0);
       Assert.AreEqual(pluginSource.NumPluginRemovedListeners, 0);
 }
 public void AddPluginSourceShouldRejectNull()
 {
     PluginRepository tested = new PluginRepository();
       DoAssert.Throws<ArgumentNullException>(() => tested.AddPluginSource(null) );
 }
 public void ConstructorShouldInitLog()
 {
     ILogWriter tested = new PluginRepository();
       Assert.IsNotNull(tested.Log);
 }
 public void DefaultConstructor()
 {
     PluginRepository tested = new PluginRepository();
 }
        public void RememberFoundPlugins()
        {
            PluginRepository tested = new PluginRepository();
              MockPluginSource pluginSource = new MockPluginSource();
              tested.AddPluginSource(pluginSource);

              var pluginsBefore = tested.Plugins(null).ToArray();
              PluginDescriptor thePlugin = new PluginDescriptor()
              {
            QualifiedName = typeof(UnitTest_PluginRepository)
              };

              pluginSource.RaisePluginAdded(thePlugin);

              var pluginsAfter = tested.Plugins(null).ToArray();

              Assert.IsTrue(pluginsAfter.Length - pluginsBefore.Length == 1);
              Assert.AreSame(thePlugin, pluginsAfter.Except(pluginsBefore).First());
        }
 public void ImplementsILogWriter()
 {
     PluginRepository tested = new PluginRepository();
       Assert.IsInstanceOfType(tested, typeof(ILogWriter));
 }
 public void ShouldLogToDebugOnPluginQuery()
 {
     PluginRepository tested = new PluginRepository();
       MockLog log = new MockLog(tested);
       PluginFilter filter = PluginFilter.Create.IsNamed("plugin name").Implements(typeof(IMockPluginInterface1));
       tested.Plugins(filter);
       Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Debug && x.Message.Contains("Returning plugins for") && x.Message.Contains(filter.ToString())));
 }
 public void ShouldLogAsInfoOnPluginRemoved()
 {
     var mockPluginSource = new Mock<IPluginSource>();
       PluginRepository tested = new PluginRepository();
       tested.AddPluginSource(mockPluginSource.Object);
       MockLog log = new MockLog(tested);
       mockPluginSource.Raise(x => x.PluginRemoved += null, new PluginEventArgs(MockPluginDescriptor.For<MockPlugin1>()));
       Assert.IsTrue(
     log.Any(
       x => x.Level == MockLog.Level.Info &&
       x.Message.Contains("Removed") &&
       x.Message.Contains(typeof(MockPlugin1).FullName)));
 }
        public void ShouldOnlyReportPluginsThatMatchesFilter()
        {
            PluginRepository tested = new PluginRepository();
              MockPluginSource pluginSource = new MockPluginSource();
              tested.AddPluginSource(pluginSource);

              PluginDescriptor plugin1 = new PluginDescriptor()
              {
            QualifiedName = typeof(MockPlugin1),
            Name = "plugin1"
              };

              PluginDescriptor plugin2 = new PluginDescriptor()
              {
            QualifiedName = typeof(MockPlugin2),
            Name = "plugin2"
              };

              pluginSource.RaisePluginAdded(plugin1);
              pluginSource.RaisePluginAdded(plugin2);

              PluginFilter filter = PluginFilter.Create.IsNamed("plugin1");
              var foundPlugins = tested.Plugins(filter);

              Assert.AreEqual(1, foundPlugins.Count());
              Assert.AreSame(plugin1, foundPlugins.First());
        }
 public void ShouldLogAsDebugWhenPluginSourceIsRemoved()
 {
     PluginRepository tested = new PluginRepository();
       MockLog log = new MockLog(tested);
       var pluginSource = new Mock<IPluginSource>().Object;
       tested.AddPluginSource(pluginSource);
       tested.RemovePluginSource(pluginSource);
       Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Debug && x.Message.Contains("removed") && x.Message.Contains(pluginSource.GetType().FullName)));
 }
 public void RemovePluginSourceMustBeAddedToBeRemoved()
 {
     PluginRepository tested = new PluginRepository();
       MockPluginSource pluginSource = new MockPluginSource();
       DoAssert.Throws<ArgumentException>(() => tested.RemovePluginSource(pluginSource) );
 }