C# Class NuGetGallery.FunctionalTests.CommandlineHelper

Provides helpers functions around NuGet.exe
Inheritance: NuGetGallery.FunctionalTests.HelperBase
Show file Open project: NuGet/NuGetGallery Class Usage Examples

Public Methods

Method Description
CommandlineHelper ( ITestOutputHelper testOutputHelper ) : System
DeletePackageAsync ( string packageId, string version, string sourceName ) : Task

Delete the specified package using Nuget.exe

InstallPackageAsync ( string packageId, string sourceName ) : Task

Install the specified package using Nuget.exe

InstallPackageAsync ( string packageId, string sourceName, string outputDirectory ) : Task

Install the specified package using Nuget.exe, specifying the output directory

InvokeNugetProcess ( List arguments, string workingDir = null, int timeout = 360 ) : Task

Invokes nuget.exe with the appropriate parameters.

PackPackageAsync ( string nuspecFileFullPath, string nuspecDir ) : Task
SpecPackageAsync ( string packageName, string packageDir ) : Task
UpdateNugetExeAsync ( ) : Task

Self update on nuget.exe

UploadPackageAsync ( string packageFullPath, string sourceName ) : Task

Uploads the given package to the specified source and returns the exit code.

Method Details

CommandlineHelper() public method

public CommandlineHelper ( ITestOutputHelper testOutputHelper ) : System
testOutputHelper ITestOutputHelper
return System

DeletePackageAsync() public method

Delete the specified package using Nuget.exe
public DeletePackageAsync ( string packageId, string version, string sourceName ) : Task
packageId string package to be deleted
version string version of package to be deleted
sourceName string source url
return Task

InstallPackageAsync() public method

Install the specified package using Nuget.exe
public InstallPackageAsync ( string packageId, string sourceName ) : Task
packageId string package to be installed
sourceName string source url
return Task

InstallPackageAsync() public method

Install the specified package using Nuget.exe, specifying the output directory
public InstallPackageAsync ( string packageId, string sourceName, string outputDirectory ) : Task
packageId string package to be installed
sourceName string source url
outputDirectory string outputDirectory
return Task

InvokeNugetProcess() public method

Invokes nuget.exe with the appropriate parameters.
public InvokeNugetProcess ( List arguments, string workingDir = null, int timeout = 360 ) : Task
arguments List cmd line args to NuGet.exe
workingDir string working dir if any to be used
timeout int Timeout in seconds (default = 6min).
return Task

PackPackageAsync() public method

public PackPackageAsync ( string nuspecFileFullPath, string nuspecDir ) : Task
nuspecFileFullPath string
nuspecDir string
return Task

SpecPackageAsync() public method

public SpecPackageAsync ( string packageName, string packageDir ) : Task
packageName string
packageDir string
return Task

UpdateNugetExeAsync() public method

Self update on nuget.exe
public UpdateNugetExeAsync ( ) : Task
return Task

UploadPackageAsync() public method

Uploads the given package to the specified source and returns the exit code.
public UploadPackageAsync ( string packageFullPath, string sourceName ) : Task
packageFullPath string
sourceName string
return Task