Example #1
0
        public void InstalledPluginPackageFromOnline()
        {
            //Arrange

            // TODO: create a simple plugin for unit test which will download faster.

            string PluginId = "PACT";
            string path     = TestResources.GetTestTempFolder(@"Solutions\PluginsManagerSR1");

            if (Directory.Exists(path))
            {
                Directory.Delete(path, true);
            }

            SolutionRepository solutionRepository = GingerSolutionRepository.CreateGingerSolutionRepository();

            solutionRepository.CreateRepository(path);
            solutionRepository.Open(path);

            PluginsManager pluginsManager = new PluginsManager(solutionRepository);
            ObservableList <PluginPackage> pluginPackages = solutionRepository.GetAllRepositoryItems <PluginPackage>();

            // Act
            var p = pluginsManager.GetOnlinePluginsIndex();
            OnlinePluginPackage onlinePluginPackage = (from x in p where x.Id == PluginId select x).SingleOrDefault();

            //OnlinePluginPackageRelease onlinePluginPackageRelease
            pluginsManager.InstallPluginPackage(onlinePluginPackage, onlinePluginPackage.Releases[0]);
            //string folder = Path.Combine(Common.GetTestResourcesFolder(), @"PluginPackages\SeleniumPluginPackage.1.0.0");


            //Assert
            Assert.AreEqual(1, pluginPackages.Count);
            Assert.AreEqual("PACT", pluginPackages[0].PluginId);
        }
Example #2
0
        private void GetPluginsList()
        {
            PluginsManager p = new PluginsManager(WorkSpace.Instance.SolutionRepository);

            xProcessingImage.Visibility = Visibility.Visible;
            xPluginsGrid.DataSourceList = p.GetOnlinePluginsIndex();
            xProcessingImage.Visibility = Visibility.Collapsed;
        }
Example #3
0
        public void GetOnlinePlugins()
        {
            //Arrange
            PluginsManager pluginsManager = new PluginsManager(WorkSpace.Instance.SolutionRepository);

            // Act
            ObservableList <OnlinePluginPackage> list = pluginsManager.GetOnlinePluginsIndex();

            //Assert
            Assert.IsTrue(list.Count > 0, "list.Count > 0");
        }
Example #4
0
        public void GetOnlinePluginReleases()
        {
            //Arrange
            PluginsManager pluginsManager             = new PluginsManager(WorkSpace.Instance.SolutionRepository);
            ObservableList <OnlinePluginPackage> list = pluginsManager.GetOnlinePluginsIndex();
            OnlinePluginPackage PACT = (from x in list where x.Id == "PACT" select x).SingleOrDefault();

            // Act
            ObservableList <OnlinePluginPackageRelease> releases = PACT.Releases;

            //Assert
            Assert.IsTrue(releases.Count > 0, "list.Count > 0");
        }
Example #5
0
        public void InstallSeleniumPlugin_1_0()
        {
            //Arrange
            PluginsManager pluginsManager             = new PluginsManager(WorkSpace.Instance.SolutionRepository);
            ObservableList <OnlinePluginPackage> list = pluginsManager.GetOnlinePluginsIndex();
            OnlinePluginPackage        plugin         = (from x in list where x.Id == "SeleniumDriver" select x).SingleOrDefault();
            OnlinePluginPackageRelease release1_1     = (from x in plugin.Releases where x.Version == "1.0" select x).SingleOrDefault();

            // Act
            string folder = pluginsManager.InstallPluginPackage(plugin, release1_1);

            //Assert
            Assert.IsTrue(Directory.Exists(folder));
        }