Skip to content

Commit

Permalink
(maint) dotnet format
Browse files Browse the repository at this point in the history
Just to tidy up the whitespace and everything, make everything neat and
tidy and consistent.
  • Loading branch information
vexx32 committed Apr 16, 2024
1 parent 8b0e4b9 commit 8d2425c
Show file tree
Hide file tree
Showing 76 changed files with 557 additions and 538 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public override void Because()
[TestFixture(false, false, false, true, TestName = "Argument Set")]
public class WhenProxyConfigurationTests : ProxyConfigurationBase
{
public WhenProxyConfigurationTests(bool system, bool environment, bool config, bool argument) : base(system, environment, config, argument) {}
public WhenProxyConfigurationTests(bool system, bool environment, bool config, bool argument) : base(system, environment, config, argument) { }
public override void Context()
{
base.Context();
Expand Down
6 changes: 3 additions & 3 deletions src/chocolatey.tests.integration/scenarios/InfoScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ public void Should_set_source_to_expected_value()
{
Results[0].Source.Should().Be(
((Platform.GetPlatform() == PlatformType.Windows ? "file:///" : "file://") + Path.Combine(Environment.CurrentDirectory, "PackageOutput"))
.Replace("\\","/"));
.Replace("\\", "/"));
}

[Fact]
Expand All @@ -422,7 +422,7 @@ public override void Context()
[Fact]
public void Should_show_only_one_result()
{
Results.Should().ContainSingle( "Expected 1 package to be returned!");
Results.Should().ContainSingle("Expected 1 package to be returned!");
}

[Fact]
Expand Down Expand Up @@ -478,7 +478,7 @@ public override void Context()
[Fact]
public void Should_show_only_one_result()
{
Results.Should().ContainSingle( "Expected 1 package to be returned!");
Results.Should().ContainSingle("Expected 1 package to be returned!");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ protected override string GetNuspecContent()
</files>
</package>";

private const string NuspecContentWithFormatableMinClientVersion = @"<?xml version=""1.0"" encoding=""utf-8""?>
private const string NuspecContentWithFormatableMinClientVersion = @"<?xml version=""1.0"" encoding=""utf-8""?>
<package xmlns=""http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"">
<metadata minClientVersion=""{0}"">
<id>test-package</id>
Expand Down
14 changes: 7 additions & 7 deletions src/chocolatey.tests.integration/scenarios/UpgradeScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3517,15 +3517,15 @@ public void Should_report_for_all_installed_packages()
public void Should_upgrade_packages_with_upgrades()
{
var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList();
upgradePackageResult.Should().ContainSingle( "upgradepackage must be there once");
upgradePackageResult.Should().ContainSingle("upgradepackage must be there once");
upgradePackageResult.First().Value.Version.Should().Be("1.1.0");
}

[Fact]
public void Should_skip_packages_without_upgrades()
{
var installPackageResult = Results.Where(x => x.Key == "installpackage").ToList();
installPackageResult.Should().ContainSingle( "installpackage must be there once");
installPackageResult.Should().ContainSingle("installpackage must be there once");
installPackageResult.First().Value.Version.Should().Be("1.0.0");
}
}
Expand Down Expand Up @@ -3556,7 +3556,7 @@ public void Should_report_for_all_installed_packages()
public void Should_upgrade_packages_with_upgrades()
{
var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList();
upgradePackageResult.Should().ContainSingle( "upgradepackage must be there once");
upgradePackageResult.Should().ContainSingle("upgradepackage must be there once");
upgradePackageResult.First().Value.Version.Should().Be("1.1.1-beta2");
}

Expand All @@ -3577,7 +3577,7 @@ public void Should_upgrade_upgradepackage()
public void Should_skip_packages_without_upgrades()
{
var installPackageResult = Results.Where(x => x.Key == "installpackage").ToList();
installPackageResult.Should().ContainSingle( "installpackage must be there once");
installPackageResult.Should().ContainSingle("installpackage must be there once");
installPackageResult.First().Value.Version.Should().Be("1.0.0");
}
}
Expand Down Expand Up @@ -3610,7 +3610,7 @@ public void Should_report_for_all_installed_packages()
public void Should_upgrade_packages_with_upgrades()
{
var upgradePackageResult = Results.Where(x => x.Key == "upgradepackage").ToList();
upgradePackageResult.Should().ContainSingle( "upgradepackage must be there once");
upgradePackageResult.Should().ContainSingle("upgradepackage must be there once");
// available version will show as last stable
upgradePackageResult.First().Value.Version.Should().Be("1.1.0");
}
Expand All @@ -3632,7 +3632,7 @@ public void Should_not_upgrade_upgradepackage()
public void Should_skip_packages_without_upgrades()
{
var installPackageResult = Results.Where(x => x.Key == "installpackage").ToList();
installPackageResult.Should().ContainSingle( "installpackage must be there once");
installPackageResult.Should().ContainSingle("installpackage must be there once");
installPackageResult.First().Value.Version.Should().Be("1.0.0");
}
}
Expand All @@ -3659,7 +3659,7 @@ public override void Because()
[Fact]
public void Should_have_a_single_package_result()
{
Results.Should().ContainSingle( "The returned package results do not have a single value!");
Results.Should().ContainSingle("The returned package results do not have a single value!");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class WhenParsingAdditionalParameters : ChocolateyCacheCommandSpecsBase
{
public override void Because()
{

}

public override void BeforeEachSpec()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ public override void Because()
[NUnit.Framework.TestCase("--localonly")]
[NUnit.Framework.TestCase("-li")]
[NUnit.Framework.TestCase("-lai")]
#pragma warning disable IDE0060 // Unused argument
#pragma warning disable IDE0060 // Unused argument
public void Should_throw_on_unsupported_argument(string argument)
#pragma warning restore IDE0060 // Unused argument
#pragma warning restore IDE0060 // Unused argument
{
Configuration.RegularOutput = true;
var errored = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
using chocolatey.infrastructure.commandline;
using chocolatey.infrastructure.filesystem;
using Moq;
using FluentAssertions;
using FluentAssertions;

namespace chocolatey.tests.infrastructure.app.commands
{
public class ChocolateyTemplateCommandSpecs
namespace chocolatey.tests.infrastructure.app.commands
{
public class ChocolateyTemplateCommandSpecs
{
[ConcernFor("template")]
public abstract class ChocolateyTemplateCommandSpecsBase : TinySpec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ public void Should_throw_exception_on_unsupported_feature()

Service.DisableFeature(config);
};
action.Should().Throw<ApplicationException>()
.WithMessage("Feature '{0}' is not supported.".FormatWith(FeatureName));
action.Should().Throw<ApplicationException>()
.WithMessage("Feature '{0}' is not supported.".FormatWith(FeatureName));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public void Generated_package_should_be_in_current_directory()

var infos = MockLogger.MessagesFor(tests.LogLevel.Info);
infos.Should().ContainSingle();
infos.Should().HaveElementAt(0,"Chocolatey would have searched for a nuspec file in \"c:\\projects\\chocolatey\" and attempted to compile it.");
infos.Should().HaveElementAt(0, "Chocolatey would have searched for a nuspec file in \"c:\\projects\\chocolatey\" and attempted to compile it.");
}

[Fact]
Expand All @@ -331,7 +331,7 @@ public void Generated_package_should_be_in_specified_directory()

var infos = MockLogger.MessagesFor(tests.LogLevel.Info);
infos.Should().ContainSingle();
infos.Should().HaveElementAt(0,"Chocolatey would have searched for a nuspec file in \"c:\\packages\" and attempted to compile it.");
infos.Should().HaveElementAt(0, "Chocolatey would have searched for a nuspec file in \"c:\\packages\" and attempted to compile it.");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void Should_log_current_directory_if_no_outputdirectory()

var infos = MockLogger.MessagesFor(LogLevel.Info);
infos.Should().ContainSingle();
infos.Should().HaveElementAt(0,"Would have generated a new package specification at c:\\chocolatey\\Bob");
infos.Should().HaveElementAt(0, "Would have generated a new package specification at c:\\chocolatey\\Bob");
}

[Fact]
Expand All @@ -93,7 +93,7 @@ public void Should_log_output_directory_if_outputdirectory_is_specified()

var infos = MockLogger.MessagesFor(LogLevel.Info);
infos.Should().ContainSingle();
infos.Should().HaveElementAt(0,"Would have generated a new package specification at c:\\packages\\Bob");
infos.Should().HaveElementAt(0, "Would have generated a new package specification at c:\\packages\\Bob");
}
}

Expand Down Expand Up @@ -133,7 +133,7 @@ public void Should_write_file_withe_replaced_tokens()

var debugs = MockLogger.MessagesFor(LogLevel.Debug);
debugs.Should().ContainSingle();
debugs.Should().HaveElementAt(0,"Bob");
debugs.Should().HaveElementAt(0, "Bob");
}

[Fact]
Expand All @@ -145,11 +145,11 @@ public void Should_log_info_if_regular_output()

var debugs = MockLogger.MessagesFor(LogLevel.Debug);
debugs.Should().ContainSingle();
debugs.Should().HaveElementAt(0,"Bob");
debugs.Should().HaveElementAt(0, "Bob");

var infos = MockLogger.MessagesFor(LogLevel.Info);
infos.Should().ContainSingle();
infos.Should().HaveElementAt(0,string.Format(@"Generating template to a file{0} at 'c:\packages\bob.nuspec'", Environment.NewLine));
infos.Should().HaveElementAt(0, string.Format(@"Generating template to a file{0} at 'c:\packages\bob.nuspec'", Environment.NewLine));
}
}

Expand Down Expand Up @@ -295,8 +295,8 @@ public void Should_generate_all_files_and_directories()

var directories = _directoryCreated.ToList();
directories.Should().HaveCount(2, "There should be 2 directories, but there was: " + string.Join(", ", directories));
directories.Should().HaveElementAt(0,"c:\\chocolatey\\Bob");
directories.Should().HaveElementAt(1,"c:\\chocolatey\\Bob\\tools");
directories.Should().HaveElementAt(0, "c:\\chocolatey\\Bob");
directories.Should().HaveElementAt(1, "c:\\chocolatey\\Bob\\tools");

_files.Should().HaveCount(2, "There should be 2 files, but there was: " + string.Join(", ", _files));
_files.Should().HaveElementAt(0, "c:\\chocolatey\\Bob\\__name_replace__.nuspec");
Expand All @@ -314,8 +314,8 @@ public void Should_generate_all_files_and_directories_even_with_outputdirectory(

var directories = _directoryCreated.ToList();
directories.Should().HaveCount(2, "There should be 2 directories, but there was: " + string.Join(", ", directories));
directories.Should().HaveElementAt(0,"c:\\packages\\Bob");
directories.Should().HaveElementAt(1,"c:\\packages\\Bob\\tools");
directories.Should().HaveElementAt(0, "c:\\packages\\Bob");
directories.Should().HaveElementAt(1, "c:\\packages\\Bob\\tools");

_files.Should().HaveCount(2, "There should be 2 files, but there was: " + string.Join(", ", _files));
_files.Should().HaveElementAt(0, "c:\\packages\\Bob\\__name_replace__.nuspec");
Expand Down Expand Up @@ -393,9 +393,9 @@ public void Should_generate_all_files_and_directories()

var directories = _directoryCreated.ToList();
directories.Should().HaveCount(3, "There should be 3 directories, but there was: " + string.Join(", ", directories));
directories.Should().HaveElementAt(0,"c:\\chocolatey\\Bob");
directories.Should().HaveElementAt(1,"c:\\chocolatey\\Bob\\tools");
directories.Should().HaveElementAt(2,"c:\\chocolatey\\Bob\\tools\\lower");
directories.Should().HaveElementAt(0, "c:\\chocolatey\\Bob");
directories.Should().HaveElementAt(1, "c:\\chocolatey\\Bob\\tools");
directories.Should().HaveElementAt(2, "c:\\chocolatey\\Bob\\tools\\lower");

_files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files));
_files.Should().HaveElementAt(0, "c:\\chocolatey\\Bob\\__name_replace__.nuspec");
Expand All @@ -415,9 +415,9 @@ public void Should_generate_all_files_and_directories_even_with_outputdirectory(

var directories = _directoryCreated.ToList();
directories.Should().HaveCount(3, "There should be 3 directories, but there was: " + string.Join(", ", directories));
directories.Should().HaveElementAt(0,"c:\\packages\\Bob");
directories.Should().HaveElementAt(1,"c:\\packages\\Bob\\tools");
directories.Should().HaveElementAt(2,"c:\\packages\\Bob\\tools\\lower");
directories.Should().HaveElementAt(0, "c:\\packages\\Bob");
directories.Should().HaveElementAt(1, "c:\\packages\\Bob\\tools");
directories.Should().HaveElementAt(2, "c:\\packages\\Bob\\tools\\lower");

_files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files));
_files.Should().HaveElementAt(0, "c:\\packages\\Bob\\__name_replace__.nuspec");
Expand Down Expand Up @@ -497,11 +497,11 @@ public void Should_generate_all_files_and_directories()

var directories = _directoryCreated.ToList();
directories.Should().HaveCount(5, "There should be 5 directories, but there was: " + string.Join(", ", directories));
directories.Should().HaveElementAt(0,"c:\\chocolatey\\Bob");
directories.Should().HaveElementAt(1,"c:\\chocolatey\\Bob\\tools");
directories.Should().HaveElementAt(2,"c:\\chocolatey\\Bob\\tools\\lower");
directories.Should().HaveElementAt(3,"c:\\chocolatey\\Bob\\empty");
directories.Should().HaveElementAt(4,"c:\\chocolatey\\Bob\\empty\\nested");
directories.Should().HaveElementAt(0, "c:\\chocolatey\\Bob");
directories.Should().HaveElementAt(1, "c:\\chocolatey\\Bob\\tools");
directories.Should().HaveElementAt(2, "c:\\chocolatey\\Bob\\tools\\lower");
directories.Should().HaveElementAt(3, "c:\\chocolatey\\Bob\\empty");
directories.Should().HaveElementAt(4, "c:\\chocolatey\\Bob\\empty\\nested");

_files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files));
_files.Should().HaveElementAt(0, "c:\\chocolatey\\Bob\\__name_replace__.nuspec");
Expand All @@ -521,11 +521,11 @@ public void Should_generate_all_files_and_directories_even_with_outputdirectory(

var directories = _directoryCreated.ToList();
directories.Should().HaveCount(5, "There should be 5 directories, but there was: " + string.Join(", ", directories));
directories.Should().HaveElementAt(0,"c:\\packages\\Bob");
directories.Should().HaveElementAt(1,"c:\\packages\\Bob\\tools");
directories.Should().HaveElementAt(2,"c:\\packages\\Bob\\tools\\lower");
directories.Should().HaveElementAt(3,"c:\\packages\\Bob\\empty");
directories.Should().HaveElementAt(4,"c:\\packages\\Bob\\empty\\nested");
directories.Should().HaveElementAt(0, "c:\\packages\\Bob");
directories.Should().HaveElementAt(1, "c:\\packages\\Bob\\tools");
directories.Should().HaveElementAt(2, "c:\\packages\\Bob\\tools\\lower");
directories.Should().HaveElementAt(3, "c:\\packages\\Bob\\empty");
directories.Should().HaveElementAt(4, "c:\\packages\\Bob\\empty\\nested");

_files.Should().HaveCount(4, "There should be 4 files, but there was: " + string.Join(", ", _files));
_files.Should().HaveElementAt(0, "c:\\packages\\Bob\\__name_replace__.nuspec");
Expand Down Expand Up @@ -850,7 +850,7 @@ public void Should_log_template_location_if_no_template_name()

var infos = MockLogger.MessagesFor(LogLevel.Info);
infos.Should().ContainSingle();
infos.Should().HaveElementAt(0,"Would have listed templates in {0}".FormatWith(ApplicationParameters.TemplatesLocation));
infos.Should().HaveElementAt(0, "Would have listed templates in {0}".FormatWith(ApplicationParameters.TemplatesLocation));
}

[Fact]
Expand Down
Loading

0 comments on commit 8d2425c

Please sign in to comment.