Esempio n. 1
0
        public async void GetPackageInfo1()
        {
            var path   = _testFiles.GetDestinationPath(Path.Combine("Parser", "ddpcr.html"));
            var actual = await RPackageWebParser.RetrievePackageInfo(new Uri(path, UriKind.Absolute));

            var expected = new RPackage()
            {
                Package          = "ddpcr",
                Title            = "Analysis and Visualization of Droplet Digital PCR in R and on the Web",
                Description      = "An interface to explore, analyze, and visualize droplet digital PCR (ddPCR) data in R. This is the first non-proprietary software for analyzing two-channel ddPCR data. An interactive tool was also created and is available online to facilitate this analysis for anyone who is not comfortable with using R.",
                Version          = "1.1.2",
                Author           = "Dean Attali [aut, cre]",
                Depends          = "R (≥ 3.1.0)",
                Published        = "2016-03-17",
                License          = "MIT + file LICENSE",
                Imports          = "DT (≥ 0.1), dplyr (≥ 0.4.0), ggplot2 (≥ 1.0.1.9003), lazyeval (≥ 0.1.10), magrittr (≥ 1.5), mixtools (≥ 1.0.2), plyr (≥ 1.8.1), readr (≥ 0.1.0), shiny (≥ 0.11.0), shinyjs (≥ 0.4.0)",
                Suggests         = "ggExtra (≥ 0.3.0), graphics, grid (≥ 3.2.2), gridExtra (≥ 2.0.0), knitr (≥ 1.7), rmarkdown, stats, testthat (≥ 0.9.1), utils",
                Maintainer       = "Dean Attali  <daattali at gmail.com>",
                URL              = "https://github.com/daattali/ddpcr",
                BugReports       = "https://github.com/daattali/ddpcr/issues",
                NeedsCompilation = "no",
            };

            actual.ShouldBeEquivalentTo(expected);
        }
 public PackageManagerIntegrationTest(RComponentsMefCatalogFixture catalog, TestMethodFixture testMethod, TestFilesFixture testFiles)
 {
     _exportProvider   = catalog.CreateExportProvider();
     _workflowProvider = _exportProvider.GetExportedValue <TestRInteractiveWorkflowProvider>();
     _testMethod       = testMethod.MethodInfo;
     _testFiles        = testFiles;
     _workflowProvider.HostClientApp = new RHostClientTestApp();
     _repo1Path = _testFiles.GetDestinationPath(Path.Combine("Repos", TestRepositories.Repo1));
     _libPath   = Path.Combine(_testFiles.GetDestinationPath("library"), _testMethod.Name);
     _lib2Path  = Path.Combine(_testFiles.GetDestinationPath("library2"), _testMethod.Name);
     Directory.CreateDirectory(_libPath);
     Directory.CreateDirectory(_lib2Path);
 }
Esempio n. 3
0
        public async Task ExportAsPdf()
        {
            using (await _workflow.GetOrCreateVisualComponent(_componentContainerFactory)) {
                // We set an initial size for plots, because export as image command
                // will use the current size of plot control as export parameter.
                await _workflow.Plots.ResizeAsync(600, 500, 96);

                await ExecuteAndWaitForPlotsAsync(new string[] {
                    "plot(1:10)",
                });

                var outputFilePath = _testFiles.GetDestinationPath("ExportedPlot.pdf");
                CoreShell.SaveFilePath = outputFilePath;

                _workflow.Plots.Commands.ExportAsPdf.Should().BeEnabled();
                await _workflow.Plots.Commands.ExportAsPdf.InvokeAsync();

                File.Exists(outputFilePath).Should().BeTrue();
                CoreShell.LastShownErrorMessage.Should().BeNullOrEmpty();
            }
        }
Esempio n. 4
0
        public async Task ExportAsPdf()
        {
            await InitializeGraphicsDevice();
            await ExecuteAndWaitForPlotsAsync(new string[] {
                "plot(1:10)",
            });

            var outputFilePath = _testFiles.GetDestinationPath("ExportedPlot.pdf");

            FileDialog.SaveFilePath = outputFilePath;

            var deviceVC       = _workflow.Plots.GetPlotVisualComponent(_workflow.Plots.ActiveDevice);
            var deviceCommands = new RPlotDeviceCommands(_workflow, deviceVC);

            deviceCommands.ExportAsPdf.Should().BeEnabled();
            await deviceCommands.ExportAsPdf.InvokeAsync();

            File.Exists(outputFilePath).Should().BeTrue();
            CoreShell.LastShownErrorMessage.Should().BeNullOrEmpty();
        }