C# Класс NuGetGallery.FunctionalTests.ClientSdkHelper

Наследование: NuGetGallery.FunctionalTests.HelperBase
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
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.

Описание методов

CheckIfPackageExistsInSource() публичный Метод

Checks if the given package is present in the source.
public CheckIfPackageExistsInSource ( string packageId, string sourceUrl ) : bool
packageId string
sourceUrl string
Результат bool

CheckIfPackageInstalled() публичный Метод

Given a package checks if it is installed properly in the current dir.
public CheckIfPackageInstalled ( string packageId ) : bool
packageId string
Результат bool

CheckIfPackageVersionExistsInSource() публичный Метод

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
Результат bool

CheckIfPackageVersionInstalled() публичный Метод

Given a package checks if it that version of the package is installed.
public CheckIfPackageVersionInstalled ( string packageId, string packageVersion ) : bool
packageId string
packageVersion string
Результат bool

ClearLocalPackageFolder() публичный Метод

Clears the local package folder.
public ClearLocalPackageFolder ( string packageId, string version = "1.0.0" ) : void
packageId string
version string
Результат void

ClearMachineCache() публичный статический Метод

Clears the local machine cache.
public static ClearMachineCache ( ) : void
Результат void

ClientSdkHelper() публичный Метод

public ClientSdkHelper ( ITestOutputHelper testOutputHelper ) : System
testOutputHelper ITestOutputHelper
Результат System

DownloadPackageAndVerify() публичный Метод

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
Результат void

GetDownLoadStatistics() публичный статический Метод

Returns the download count of the given package.
public static GetDownLoadStatistics ( string packageId ) : int
packageId string
Результат int

GetDownLoadStatisticsForPackageVersion() публичный статический Метод

Returns the download count of the specific version of the package.
public static GetDownLoadStatisticsForPackageVersion ( string packageId, string packageVersion ) : int
packageId string
packageVersion string
Результат int

GetFormattedDownLoadStatistics() публичный статический Метод

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
Результат string

GetLatestStableVersion() публичный статический Метод

Returns the latest stable version string for the given package.
public static GetLatestStableVersion ( string packageId ) : string
packageId string
Результат string

GetPackageCountForSearchTerm() публичный статический Метод

Searchs the gallery to get the packages matching the specific search term and returns their count.
public static GetPackageCountForSearchTerm ( string searchQuery ) : int
searchQuery string
Результат int

GetPackageIdFromNupkgFile() публичный Метод

Given the path to the nupkg file, returns the corresponding package ID.
public GetPackageIdFromNupkgFile ( string filePath ) : string
filePath string
Результат string

GetVersionCount() публичный Метод

Returns the count of versions available for the given package
public GetVersionCount ( string packageId, bool allowPreRelease = true ) : int
packageId string
allowPreRelease bool
Результат int

IsPackageVersionUnListed() публичный Метод

Given the path to the nupkg file, returns the corresponding package ID.
public IsPackageVersionUnListed ( string packageId, string version ) : bool
packageId string
version string
Результат bool

UnlistPackage() публичный Метод

public UnlistPackage ( string packageId, string version = "1.0.0" ) : Task
packageId string
version string
Результат Task

UnlistPackageAndVerify() публичный Метод

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
Результат Task

UploadNewPackage() публичный Метод

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
Результат Task

UploadNewPackageAndVerify() публичный Метод

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
Результат Task

VerifyPackageExistsInSource() публичный Метод

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.
Результат void