public void Should_Set_RequireConsent_To_False_By_Default() { // Given, When var settings = new NuGetRestoreSettings(); // Then Assert.False(settings.RequireConsent); }
public void Should_Set_NoCache_To_False_By_Default() { // Given, When var settings = new NuGetRestoreSettings(); // Then Assert.False(settings.NoCache); }
public void Should_Set_NonInteractive_To_True_By_Default() { // Given, When var settings = new NuGetRestoreSettings(); // Then Assert.True(settings.NonInteractive); }
static BuildConfig() { // are we technically able to execute 64bit processes? // if that returns false, we cannot run unit-tests for that platform. Is64BitOS = Environment.Is64BitOperatingSystem; Projects = new ObservableCollection <FilePath>(); Projects.CollectionChanged += (sender, args) => config = null; Platforms = new List <PlatformTarget>(); RestoreSettings = new NuGetRestoreSettings(); AssemblyProperties = new Dictionary <string, string>(); ProjectAssemblyProperties = DefaultAssembliesFunc; GeneratedAssemblyMetaDataTemplate = DefaultGeneratedAssemblyMetaDataTemplate; TargetDirectory = "build-artefacts"; }
public static DotNetCoreRestoreSettings ConvertRestoreSettings(NuGetRestoreSettings settings) { var s = new DotNetCoreRestoreSettings(); if (settings == null) { return(s); } ApplyToolSettings(s, settings); s.ConfigFile = settings.ConfigFile; s.PackagesDirectory = settings.PackagesDirectory; s.Verbosity = Convert(settings.Verbosity); s.DisableParallel = settings.DisableParallelProcessing; s.NoCache = settings.NoCache; if (settings.Source != null) { s.Sources = new List <string>(settings.Source); } return(s); }
public NuGetRestorerFixture() { TargetFilePath = "./project.sln"; Settings = new NuGetRestoreSettings(); }
public static void NuGetRestore(this ICakeContext context, IEnumerable <FilePath> targetFilePaths, NuGetRestoreSettings settings) { if (targetFilePaths == null) { throw new ArgumentNullException("context"); } foreach (var targetFilePath in targetFilePaths) { NuGetRestore(context, targetFilePath, settings); } }
public static void NuGetRestore(this ICakeContext context, FilePath targetFilePath, NuGetRestoreSettings settings) { if (context == null) { throw new ArgumentNullException("context"); } var resolver = new NuGetToolResolver(context.FileSystem, context.Environment, context.Tools); var runner = new NuGetRestorer(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, resolver); runner.Restore(targetFilePath, settings); }
public static void NuGetRestore(this ICakeContext context, IEnumerable <FilePath> targetFilePaths) { var settings = new NuGetRestoreSettings(); NuGetRestore(context, targetFilePaths, settings); }
public static void NuGetRestore(this ICakeContext context, FilePath targetFilePath) { var settings = new NuGetRestoreSettings(); NuGetRestore(context, targetFilePath, settings); }