NuGetGallery.FunctionalTests.ODataHelper.DownloadPackageFromV2FeedWithOperation C# (CSharp) Method

DownloadPackageFromV2FeedWithOperation() public method

public DownloadPackageFromV2FeedWithOperation ( string packageId, string version, string operation ) : System.Threading.Tasks.Task
packageId string
version string
operation string
return System.Threading.Tasks.Task
        public async Task DownloadPackageFromV2FeedWithOperation(string packageId, string version, string operation)
        {
            string filename = await DownloadPackageFromFeed(packageId, version, operation);

            // Check if the file exists.
            Assert.True(File.Exists(filename), Constants.PackageDownloadFailureMessage);
            var clientSdkHelper = new ClientSdkHelper(TestOutputHelper);
            string downloadedPackageId = clientSdkHelper.GetPackageIdFromNupkgFile(filename);
            // Check that the downloaded Nupkg file is not corrupt and it indeed corresponds to the package which we were trying to download.
            Assert.True(downloadedPackageId.Equals(packageId), Constants.UnableToZipError);
        }