Beispiel #1
0
 public Runner(ISemanticVersioning versioning, INuGet nuget, NuGetConfiguration config, IReporter reporter)
 {
     _versioning = versioning;
     _nuget = nuget;
     _config = config;
     _reporter = reporter;
 }
Beispiel #2
0
 public SolutionRunner(ICmdLine cmdLine, IHelpDisplay helpDisplay, IFileSystem fileSystem, IMSBuild msBuild, ILogger logger, IProcessRunner processRunner, INuGet nuGet)
 {
     _cmdLine = cmdLine;
     _helpDisplay = helpDisplay;
     _fileSystem = fileSystem;
     _msBuild = msBuild;
     _logger = logger;
     _processRunner = processRunner;
     _nuGet = nuGet;
 }
Beispiel #3
0
        /// <summary>
        /// Defines a tool which can be downloaded if missing from an URL
        /// </summary>
        /// <param name="nuget">NuGet implementation</param>
        /// <param name="name">Unique name of this tool</param>
        /// <param name="defaultInstallLocation">Default installation location where the tool can be found</param>
        /// <param name="executableName">File name of the executable to be ran</param>
        /// <param name="packageName">The NuGet package name</param>
        /// <param name="packageVersion">The NuGEt package version</param>
        /// <param name="parameters">Application parameters</param>
        protected DownloadableNugetTool(INuGet nuget, string name, string defaultInstallLocation, string executableName, string packageName, string packageVersion, IParameters parameters)
            : base(name, defaultInstallLocation, executableName, new Uri("file:///"), true, parameters)
        {
            this.nuget                  = nuget;
            this.packageName            = packageName;
            this.packageVersion         = packageVersion;
            this.defaultInstallLocation = defaultInstallLocation;
            this.executableName         = executableName;

            bariInstallLocation =
                Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
                             "bari", "tools", name);
        }
Beispiel #4
0
 public CraneApi(
     ISolutionReader solutionReader,
     IAssemblyInfoWriter assemblyInfoWriter,
     Func <ISolutionContext> solutionContext,
     ISolutionPathResolver solutionPathResolver,
     ISourceControlInformationReader sourceControlInformationReader,
     INuGet nuGet,
     IFileManager fileManager)
 {
     _solutionReader                 = solutionReader;
     _assemblyInfoWriter             = assemblyInfoWriter;
     _solutionContext                = solutionContext;
     _solutionPathResolver           = solutionPathResolver;
     _sourceControlInformationReader = sourceControlInformationReader;
     _nuGet       = nuGet;
     _fileManager = fileManager;
 }
Beispiel #5
0
        public void nuget_command_fails_validations_when_command_output_prints_error(
            INuGet nuGetRunner,
            RunResult runResult,
            bool validateResult)
        {
            "Given I have a nuget runner"
            ._(() => nuGetRunner = ServiceLocator.Resolve <INuGet>());

            "And I have ran nuget and it returned a non-zero exit code"
            ._(() => runResult = new RunResult("nuget pack file.nuspec", "nuget pack contains invalid arguments blah blah", null, 0));

            "When I validate the run result"
            ._(() => validateResult = nuGetRunner.ValidateResult(runResult));

            "Then it should fail validation"
            ._(() => validateResult.Should().BeFalse());
        }
Beispiel #6
0
        public void nuget_command_fails_validations_on_non_zero_exit_code(
            INuGet nuGetRunner,
            RunResult runResult,
            bool validateResult)
        {
            "Given I have a nuget runner"
            ._(() => nuGetRunner = ServiceLocator.Resolve <INuGet>());

            "And I have ran nuget and it returned a non-zero exit code"
            ._(() => runResult = new RunResult("nuget pack file.nuspec", null, null, 110));

            "When I validate the run result"
            ._(() => validateResult = nuGetRunner.ValidateResult(runResult));

            "Then it should fail validation"
            ._(() => validateResult.Should().BeFalse());
        }
Beispiel #7
0
 public NugetProductPackager(INuGet nuget, Suite suite, [TargetRoot] IFileSystemDirectory targetRoot)
 {
     this.nuget      = nuget;
     this.suite      = suite;
     this.targetRoot = targetRoot;
 }
Beispiel #8
0
 public ConsoleRunner(IVisualStudioService visualStudioService, INuGet nuget)
 {
     this.visualStudioService = visualStudioService;
     this.nuget = nuget;
 }
Beispiel #9
0
 public NuGetAssemblyProviderFactory(INuGet installer) =>
Beispiel #10
0
 public ConsoleRunner(IVisualStudioService visualStudioService, INuGet nuget)
 {
     this.visualStudioService = visualStudioService;
     this.nuget = nuget;
 }
Beispiel #11
0
 public Gallio(INuGet nuget, [TargetRoot] IFileSystemDirectory targetDir, IParameters parameters)
     : base(nuget, "Gallio", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "gallio"),
            Path.Combine("bin", "Gallio.Echo.exe"), "GallioBundle", "3.4.14", parameters)
 {
     this.targetDir = targetDir;
 }
Beispiel #12
0
 public NugetProductPackager(INuGet nuget, Suite suite, [TargetRoot] IFileSystemDirectory targetRoot)
 {
     this.nuget = nuget;
     this.suite = suite;
     this.targetRoot = targetRoot;
 }
Beispiel #13
0
 public SemanticVersioning(INuGet nuget)
 {
     _nuget = nuget;
 }
Beispiel #14
0
 public NUnit(INuGet nuget, [TargetRoot] IFileSystemDirectory targetDir, IParameters parameters)
     : base(nuget, "NUnit", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "NUnit.org", "nunit-console"),
            executableName, "NUnit.Runners", "3.10.0", parameters)
 {
     this.targetDir = targetDir;
 }