public async Task VerifyDownloadAgainstNuGetOrg()
        {
            var exitCode = await Program.Main(new[]
            {
                "download",
                "--data-dir", _dataDir,
                "--json-formatting", "Pretty",
                "--max-commits", "1",
                "--parallel-downloads", "4",
            });

            Assert.Equal(0, exitCode);
            _dd.AssertFileExists("v3/index.json");
            _dd.AssertFileExists("v3/catalog0/index.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/page0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/adam.jsgenerator.1.1.0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/agatha-rrsl.1.2.0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/altairis.mailtoolkit.1.0.0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/altairis.web.security.2.0.0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/altairis.web.ui.2.0.0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/antixss.4.0.1.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/antlr.3.1.1.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/antlr.3.1.3.42154.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/argotic.common.2008.0.2.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/argotic.core.2008.0.2.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/argotic.extensions.2008.0.2.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/argotic.web.2008.0.2.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/artem.xmlproviders.2.5.0.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/ashmind.extensions.1.0.3.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/attributerouting.0.5.3967.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/autofac.2.2.4.900.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/autofac.2.3.2.632.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/autofac.mvc2.2.2.4.900.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/autofac.web.2.2.4.900.json");
            _dd.AssertTestData(NuGetOrg, "v3/catalog0/data/2015.02.01.06.22.45/autofac.web.2.3.2.632.json");
            _dd.AssertDownloadCursor("v3/catalog0", "\"2015-02-01T06:22:45.8488496+00:00\"");
        }
Ejemplo n.º 2
0
        public async Task VerifyStep123And4_MaxPages2(DownloadDepth depth)
        {
            _dd.Depth = depth;
            _maxPages = 2;

            CopyFilesToWebRoot(Step1);
            CopyFilesToWebRoot(Step2a);
            CopyFilesToWebRoot(Step2b);
            CopyFilesToWebRoot(Step3);
            CopyFilesToWebRoot(Step4);

            await ExecuteAsync();

            AssertDownload(DownloadDepth.ServiceIndex, Step1, "index.json");
            AssertDownload(DownloadDepth.CatalogIndex, Step4, "catalog/index.json");
            AssertDownload(DownloadDepth.CatalogPage, Step2a, "catalog/page0.json", "catalog/page0-page499/page0.json");
            AssertDownload(DownloadDepth.CatalogPage, Step4, "catalog/page1.json", "catalog/page0-page499/page1.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step1, "catalog/2020.10.20.00.00.00/a.1.0.0.json", "catalog/2020/10/20/00/00.00/a.1.0.0.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step2a, "catalog/2020.10.21.00.00.00/a.2.0.0.json", "catalog/2020/10/21/00/00.00/a.2.0.0.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step2a, "catalog/2020.10.21.00.00.00/b.1.0.0.json", "catalog/2020/10/21/00/00.00/b.1.0.0.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step3, "catalog/2020.10.22.00.00.00/b.2.0.0.json", "catalog/2020/10/22/00/00.00/b.2.0.0.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step4, "catalog/2020.10.23.00.00.00/c.1.0.0.json", "catalog/2020/10/23/00/00.00/c.1.0.0.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step4, "catalog/2020.10.24.00.00.00/c.2.0.0.json", "catalog/2020/10/24/00/00.00/c.2.0.0.json");
            AssertRequestCount();
            _dd.AssertDownloadCursor("catalog", "\"2020-10-24T00:00:00+00:00\"");

            await ExecuteAsync();

            AssertDownload(DownloadDepth.ServiceIndex, Step1, "index.json");
            AssertDownload(DownloadDepth.CatalogIndex, Step4, "catalog/index.json");
            AssertDownload(DownloadDepth.CatalogPage, Step4, "catalog/page2.json", "catalog/page0-page499/page2.json");
            AssertDownload(DownloadDepth.CatalogLeaf, Step4, "catalog/2020.10.25.00.00.00/c.3.0.0.json", "catalog/2020/10/25/00/00.00/c.3.0.0.json");
            AssertRequestCount();
            _dd.AssertDownloadCursor("catalog", "\"2020-10-25T00:00:00+00:00\"");
        }