コード例 #1
0
        public async Task UploadMultipleVersionOfPackage()
        {
            var packageId = string.Format("TestMultipleVersion.{0}", DateTime.Now.Ticks);

            await _clientSdkHelper.UploadNewPackage(packageId, "1.0.0");

            await _clientSdkHelper.UploadNewPackage(packageId, "2.0.0");

            await _clientSdkHelper.VerifyPackageExistsInV2AndV3Async(packageId, "1.0.0");

            await _clientSdkHelper.VerifyPackageExistsInV2AndV3Async(packageId, "2.0.0");

            await _clientSdkHelper.VerifyVersionCountAsync(packageId, 2);
        }
コード例 #2
0
        public async Task UploadAndDownloadPackageWithMinClientVersion()
        {
            string packageId       = DateTime.Now.Ticks + "PackageWithDotCsNames.Cs";
            string version         = "1.0.0";
            string packageFullPath = await _packageCreationHelper.CreatePackageWithMinClientVersion(packageId, version, "2.3");

            var processResult = await _commandlineHelper.UploadPackageAsync(packageFullPath, UrlHelper.V2FeedPushSourceUrl);

            Assert.True(processResult.ExitCode == 0, Constants.UploadFailureMessage);

            await _clientSdkHelper.VerifyPackageExistsInV2AndV3Async(packageId, version);

            //Delete package from local disk so once it gets uploaded
            if (File.Exists(packageFullPath))
            {
                File.Delete(packageFullPath);
                Directory.Delete(Path.GetFullPath(Path.GetDirectoryName(packageFullPath)), true);
            }
            _clientSdkHelper.DownloadPackageAndVerify(packageId);
        }