Exemple #1
0
        public void TryDownloadPackage()
        {
            string packageId = "EntityFramework"; //try to down load a pre-defined test package.
            string version   = "5.0.0";
            //Just try download and not actual download. Since this will be used in load test, we don't to actually download the nupkg everytime.
            string redirectUrl = ODataHelper.TryDownloadPackageFromFeed(packageId, version).Result;

            Assert.IsNotNull(redirectUrl, " Package download from V2 feed didnt work");
            string expectedSubString = "packages/entityframework.5.0.0.nupkg";

            Assert.IsTrue(redirectUrl.Contains(expectedSubString), " The re-direct Url {0} doesnt contain the expect substring {1}", redirectUrl, expectedSubString);
        }
Exemple #2
0
        public async Task DownloadPackageSimulationTest()
        {
            // Check that downloading a package returns a valid redirect URL.
            // We don't actually download the package as this runs as part of a load test.
            string packageId = "EntityFramework";
            string version   = "5.0.0";

            var    odataHelper = new ODataHelper();
            string redirectUrl = await odataHelper.TryDownloadPackageFromFeed(packageId, version);

            Assert.IsNotNull(redirectUrl, " Package download from V2 feed didnt work");
            string expectedSubString = "packages/entityframework.5.0.0.nupkg";

            Assert.IsTrue(redirectUrl.Contains(expectedSubString), " The re-direct Url {0} doesnt contain the expect substring {1}", redirectUrl, expectedSubString);
        }