示例#1
0
            public void Should_Set_Prerelease_To_False_By_Default()
            {
                // Given, When
                var settings = new NuGetUpdateSettings();

                // Then
                Assert.False(settings.Prerelease);
            }
示例#2
0
 public NuGetUpdateFixture(FilePath toolPath = null, bool defaultToolExist = true)
 {
     TargetFile = "./packages.config";
     Settings   = new NuGetUpdateSettings();
 }
示例#3
0
 public NuGetUpdateFixture()
 {
     TargetFile = "./packages.config";
     Settings   = new NuGetUpdateSettings();
 }
示例#4
0
        public static void NuGetUpdate(this ICakeContext context, IEnumerable <FilePath> targetFiles, NuGetUpdateSettings settings)
        {
            if (targetFiles == null)
            {
                throw new ArgumentNullException("targetFiles");
            }

            foreach (var targetFile in targetFiles)
            {
                NuGetUpdate(context, targetFile, settings);
            }
        }
示例#5
0
        public static void NuGetUpdate(this ICakeContext context, FilePath targetFile, NuGetUpdateSettings settings)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            var resolver = new NuGetToolResolver(context.FileSystem, context.Environment, context.Tools);
            var runner   = new NuGetUpdater(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools, resolver);

            runner.Update(targetFile, settings);
        }
示例#6
0
        public static void NuGetUpdate(this ICakeContext context, IEnumerable <FilePath> targetFiles)
        {
            var settings = new NuGetUpdateSettings();

            NuGetUpdate(context, targetFiles, settings);
        }
示例#7
0
        public static void NuGetUpdate(this ICakeContext context, FilePath targetFile)
        {
            var settings = new NuGetUpdateSettings();

            NuGetUpdate(context, targetFile, settings);
        }