public void ShouldNotSaveExistsPlugin()
        {
            _pluginRepository
            .Setup(_ => _.GetByType(
                       _testPlugin.Object.GetType().FullName,
                       _testPlugin.Object.GetType().Assembly.GetName().Name,
                       PluginType.VersionControl))
            .Returns(new Plugins());

            _target.Initialize(_testPlugin.Object);

            _pluginRepository.Verify(_ => _.Insert(It.IsAny <Plugins>()), Times.Never);

            _pluginSettingProvider.Verify(_ => _.Initialize(_testPlugin.Object, PluginType.IssueTracker), Times.Never);

            _pluginContainerProvider.Verify(_ => _.Register(_testPlugin.Object, _testPlugin.Object.GetType().FullName),
                                            Times.Once);
        }
        public void InitializePlugins()
        {
            lock (PluginInitializationLocker)
            {
                _log.Trace(Resources.Resources.PluginInitializer_InitializePlugins_Plugins_initialization_started);

                var pluginInstances = _pluginLoader.Load();

                var initialized = 0;

                foreach (var plugin in pluginInstances)
                {
                    _pluginProvider.Initialize(plugin);

                    initialized++;
                }

                _log.Debug(
                    Resources.Resources.PluginInitializer_InitializePlugins_Plugins_Initialization_finished.FormatWith(initialized));
            }
        }