C# Class NuGetGallery.FunctionalTests.ClientSdkHelper

Inheritance: NuGetGallery.FunctionalTests.HelperBase
Afficher le fichier Open project: NuGet/NuGetGallery Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
CheckIfPackageExistsInSource ( string packageId, string sourceUrl ) : bool

Checks if the given package is present in the source.

CheckIfPackageInstalled ( string packageId ) : bool

Given a package checks if it is installed properly in the current dir.

CheckIfPackageVersionExistsInSource ( string packageId, string version, string sourceUrl ) : bool

Checks if the given package version is present in the source.

CheckIfPackageVersionInstalled ( string packageId, string packageVersion ) : bool

Given a package checks if it that version of the package is installed.

ClearLocalPackageFolder ( string packageId, string version = "1.0.0" ) : void

Clears the local package folder.

ClearMachineCache ( ) : void

Clears the local machine cache.

ClientSdkHelper ( ITestOutputHelper testOutputHelper ) : System
DownloadPackageAndVerify ( string packageId, string version = "1.0.0" ) : void

Downloads a package to local folder and see if the download is successful. Used to individual tests which extend the download scenarios.

GetDownLoadStatistics ( string packageId ) : int

Returns the download count of the given package.

GetDownLoadStatisticsForPackageVersion ( string packageId, string packageVersion ) : int

Returns the download count of the specific version of the package.

GetFormattedDownLoadStatistics ( string packageId ) : string

Returns the download count of the given package as a formatted string as it would appear in the gallery UI.

GetLatestStableVersion ( string packageId ) : string

Returns the latest stable version string for the given package.

GetPackageCountForSearchTerm ( string searchQuery ) : int

Searchs the gallery to get the packages matching the specific search term and returns their count.

GetPackageIdFromNupkgFile ( string filePath ) : string

Given the path to the nupkg file, returns the corresponding package ID.

GetVersionCount ( string packageId, bool allowPreRelease = true ) : int

Returns the count of versions available for the given package

IsPackageVersionUnListed ( string packageId, string version ) : bool

Given the path to the nupkg file, returns the corresponding package ID.

UnlistPackage ( string packageId, string version = "1.0.0" ) : Task
UnlistPackageAndVerify ( string packageId, string version = "1.0.0" ) : Task

Unlists a package with the specified Id and Version and checks if the unlist has succeeded. Throws if the unlist fails or cannot be verified in the source.

UploadNewPackage ( string packageId, string version = "1.0.0", string minClientVersion = null, string title = null, string tags = null, string description = null, string licenseUrl = null, string dependencies = null ) : Task
UploadNewPackageAndVerify ( string packageId, string version = "1.0.0", string minClientVersion = null, string title = null, string tags = null, string description = null, string licenseUrl = null, string dependencies = null ) : Task

Creates a package with the specified Id and Version and uploads it and checks if the upload has succeeded. Throws if the upload fails or cannot be verified in the source.

VerifyPackageExistsInSource ( string packageId, string version = "1.0.0" ) : void

Throws if the specified package cannot be found in the source.

Method Details

CheckIfPackageExistsInSource() public méthode

Checks if the given package is present in the source.
public CheckIfPackageExistsInSource ( string packageId, string sourceUrl ) : bool
packageId string
sourceUrl string
Résultat bool

CheckIfPackageInstalled() public méthode

Given a package checks if it is installed properly in the current dir.
public CheckIfPackageInstalled ( string packageId ) : bool
packageId string
Résultat bool

CheckIfPackageVersionExistsInSource() public méthode

Checks if the given package version is present in the source.
public CheckIfPackageVersionExistsInSource ( string packageId, string version, string sourceUrl ) : bool
packageId string
version string
sourceUrl string
Résultat bool

CheckIfPackageVersionInstalled() public méthode

Given a package checks if it that version of the package is installed.
public CheckIfPackageVersionInstalled ( string packageId, string packageVersion ) : bool
packageId string
packageVersion string
Résultat bool

ClearLocalPackageFolder() public méthode

Clears the local package folder.
public ClearLocalPackageFolder ( string packageId, string version = "1.0.0" ) : void
packageId string
version string
Résultat void

ClearMachineCache() public static méthode

Clears the local machine cache.
public static ClearMachineCache ( ) : void
Résultat void

ClientSdkHelper() public méthode

public ClientSdkHelper ( ITestOutputHelper testOutputHelper ) : System
testOutputHelper ITestOutputHelper
Résultat System

DownloadPackageAndVerify() public méthode

Downloads a package to local folder and see if the download is successful. Used to individual tests which extend the download scenarios.
public DownloadPackageAndVerify ( string packageId, string version = "1.0.0" ) : void
packageId string
version string
Résultat void

GetDownLoadStatistics() public static méthode

Returns the download count of the given package.
public static GetDownLoadStatistics ( string packageId ) : int
packageId string
Résultat int

GetDownLoadStatisticsForPackageVersion() public static méthode

Returns the download count of the specific version of the package.
public static GetDownLoadStatisticsForPackageVersion ( string packageId, string packageVersion ) : int
packageId string
packageVersion string
Résultat int

GetFormattedDownLoadStatistics() public static méthode

Returns the download count of the given package as a formatted string as it would appear in the gallery UI.
public static GetFormattedDownLoadStatistics ( string packageId ) : string
packageId string
Résultat string

GetLatestStableVersion() public static méthode

Returns the latest stable version string for the given package.
public static GetLatestStableVersion ( string packageId ) : string
packageId string
Résultat string

GetPackageCountForSearchTerm() public static méthode

Searchs the gallery to get the packages matching the specific search term and returns their count.
public static GetPackageCountForSearchTerm ( string searchQuery ) : int
searchQuery string
Résultat int

GetPackageIdFromNupkgFile() public méthode

Given the path to the nupkg file, returns the corresponding package ID.
public GetPackageIdFromNupkgFile ( string filePath ) : string
filePath string
Résultat string

GetVersionCount() public méthode

Returns the count of versions available for the given package
public GetVersionCount ( string packageId, bool allowPreRelease = true ) : int
packageId string
allowPreRelease bool
Résultat int

IsPackageVersionUnListed() public méthode

Given the path to the nupkg file, returns the corresponding package ID.
public IsPackageVersionUnListed ( string packageId, string version ) : bool
packageId string
version string
Résultat bool

UnlistPackage() public méthode

public UnlistPackage ( string packageId, string version = "1.0.0" ) : Task
packageId string
version string
Résultat Task

UnlistPackageAndVerify() public méthode

Unlists a package with the specified Id and Version and checks if the unlist has succeeded. Throws if the unlist fails or cannot be verified in the source.
public UnlistPackageAndVerify ( string packageId, string version = "1.0.0" ) : Task
packageId string
version string
Résultat Task

UploadNewPackage() public méthode

public UploadNewPackage ( string packageId, string version = "1.0.0", string minClientVersion = null, string title = null, string tags = null, string description = null, string licenseUrl = null, string dependencies = null ) : Task
packageId string
version string
minClientVersion string
title string
tags string
description string
licenseUrl string
dependencies string
Résultat Task

UploadNewPackageAndVerify() public méthode

Creates a package with the specified Id and Version and uploads it and checks if the upload has succeeded. Throws if the upload fails or cannot be verified in the source.
public UploadNewPackageAndVerify ( string packageId, string version = "1.0.0", string minClientVersion = null, string title = null, string tags = null, string description = null, string licenseUrl = null, string dependencies = null ) : Task
packageId string
version string
minClientVersion string
title string
tags string
description string
licenseUrl string
dependencies string
Résultat Task

VerifyPackageExistsInSource() public méthode

Throws if the specified package cannot be found in the source.
public VerifyPackageExistsInSource ( string packageId, string version = "1.0.0" ) : void
packageId string Id of the package.
version string Version of the package.
Résultat void