TryDownloadPackageFromFeed() public method

public TryDownloadPackageFromFeed ( string packageId, string version ) : Task
packageId string
version string
return Task
Exemplo n.º 1
0
 public async Task DownloadPackageSimulationTest()
 {
     string packageId = "EntityFramework"; //try to down load a pre-defined 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.
     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);
 }