Skip to content

Commit

Permalink
(maint) formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ferventcoder committed Dec 23, 2015
1 parent aefd3e5 commit 4643bab
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/chocolatey.tests.integration/NUnitSetup.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright © 2011 - Present RealDimensions Software, LLC
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
//
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -62,40 +62,40 @@ public override void BeforeEverything()
}

/// <summary>
/// Most of the application parameters are already set by runtime and are readonly values.
/// They need to be updated, so we can do that with reflection.
/// Most of the application parameters are already set by runtime and are readonly values.
/// They need to be updated, so we can do that with reflection.
/// </summary>
private static void fix_application_parameter_variables(Container container)
{
var fileSystem = container.GetInstance<IFileSystem>();

var applicationLocation = fileSystem.get_directory_name(fileSystem.get_current_assembly_path());

var field = typeof (ApplicationParameters).GetField("InstallLocation");
var field = typeof(ApplicationParameters).GetField("InstallLocation");
field.SetValue(null, applicationLocation);

field = typeof (ApplicationParameters).GetField("LicenseFileLocation");
field = typeof(ApplicationParameters).GetField("LicenseFileLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "license", "chocolatey.license.xml"));

field = typeof (ApplicationParameters).GetField("LoggingLocation");
field = typeof(ApplicationParameters).GetField("LoggingLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "logs"));

field = typeof (ApplicationParameters).GetField("GlobalConfigFileLocation");
field = typeof(ApplicationParameters).GetField("GlobalConfigFileLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "config", "chocolatey.config"));

field = typeof (ApplicationParameters).GetField("PackagesLocation");
field = typeof(ApplicationParameters).GetField("PackagesLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "lib"));

field = typeof (ApplicationParameters).GetField("PackageFailuresLocation");
field = typeof(ApplicationParameters).GetField("PackageFailuresLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "lib-bad"));

field = typeof(ApplicationParameters).GetField("PackageBackupLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "lib-bkp"));

field = typeof (ApplicationParameters).GetField("ShimsLocation");
field = typeof(ApplicationParameters).GetField("ShimsLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, "bin"));

field = typeof (ApplicationParameters).GetField("ChocolateyPackageInfoStoreLocation");
field = typeof(ApplicationParameters).GetField("ChocolateyPackageInfoStoreLocation");
field.SetValue(null, fileSystem.combine_paths(ApplicationParameters.InstallLocation, ".chocolatey"));

// we need to speed up specs a bit, so only try filesystem locking operations twice
Expand All @@ -108,7 +108,7 @@ private static void fix_application_parameter_variables(Container container)

private void unpack_self(Container container, ChocolateyConfiguration config)
{
var unpackCommand = container.GetInstance<ChocolateyUnpackSelfCommand>();
var unpackCommand = container.GetInstance<ChocolateyUnpackSelfCommand>();
unpackCommand.run(config);
}

Expand All @@ -125,8 +125,8 @@ private void build_packages(Container container, ChocolateyConfiguration config)
}

var files = fileSystem.get_files(contextDir, "*.nuspec", SearchOption.AllDirectories);
var command = container.GetInstance<ChocolateyPackCommand>();

var command = container.GetInstance<ChocolateyPackCommand>();
foreach (var file in files.or_empty_list_if_null())
{
config.Input = file;
Expand Down

0 comments on commit 4643bab

Please sign in to comment.