Exemple #1
0
        public async Task UploadAndUnlistPackages(string apiKey)
        {
            // Can push new package ID
            await _clientSdkHelper.UploadPackage(apiKey);

            // Can push new version of an existing package
            await _clientSdkHelper.UploadPackageVersion(apiKey);

            // Can unlist versions of an existing package
            await _clientSdkHelper.UnlistPackage(apiKey);
        }
        public async Task VerifyPackageKey_Returns404ForMissingPackage()
        {
            // Arrange
            var packageInfo = await _clientSdkHelper.UploadPackage();
            var packageId = packageInfo.Id;
            var packageVersion = packageInfo.Version;
            var missingPackageId = UploadHelper.GetUniquePackageId();

            var verificationKey = await CreateVerificationKey(GalleryConfiguration.Instance.Account.ApiKey, packageId, packageVersion);
            
            // Act & Assert
            Assert.Equal(HttpStatusCode.NotFound, await VerifyPackageKey(verificationKey, missingPackageId, "1.0.0"));
        }