Merge branch 'rel/1.0.0'

Conflicts:
	TestAssets/TestPackages/dotnet-hello/v1/dotnet-hello/dotnet-hello.csproj
	TestAssets/TestPackages/dotnet-hello/v2/dotnet-hello/dotnet-hello.csproj
	TestAssets/TestPackages/dotnet-prefercliruntime/dotnet-prefercliruntime.csproj
	TestAssets/TestProjects/AppWithDirectAndToolDep/AppWithDirectAndToolDep.csproj
	TestAssets/TestProjects/AppWithDirectDep/AppWithDirectDep.csproj
	build.proj
	build/Compile.targets
	build/Microsoft.DotNet.Cli.Compile.targets
	build/Microsoft.DotNet.Cli.DependencyVersions.props
	build/Microsoft.DotNet.Cli.Monikers.props
	build/Microsoft.DotNet.Cli.Prepare.targets
	build/package/Microsoft.DotNet.Cli.Nupkg.targets
	build/package/Nupkg.targets
	build/test/TestPackageProjects.targets
	build_projects/dotnet-cli-build/GenerateBuildVersionInfo.cs
	build_projects/dotnet-cli-build/GetCommitCount.cs
	build_projects/dotnet-cli-build/dotnet-cli-build.csproj
	build_projects/shared-build-targets-utils/Utils/BuildVersion.cs
	src/dotnet-archive/dotnet-archive.csproj
	src/tool_msbuild/tool_msbuild.csproj
	src/tool_nuget/tool_nuget.csproj
	test/ArgumentForwardingTests/ArgumentForwardingTests.csproj
	test/ArgumentsReflector/ArgumentsReflector.csproj
	test/EndToEnd/EndToEnd.csproj
	test/Microsoft.DotNet.Cli.Sln.Internal.Tests/Microsoft.DotNet.Cli.Sln.Internal.Tests.csproj
	test/Microsoft.DotNet.Cli.Utils.Tests/GivenAProjectToolsCommandResolver.cs
	test/Microsoft.DotNet.Cli.Utils.Tests/Microsoft.DotNet.Cli.Utils.Tests.csproj
	test/Microsoft.DotNet.Configurer.UnitTests/Microsoft.DotNet.Configurer.UnitTests.csproj
	test/Microsoft.DotNet.ProjectJsonMigration.Tests/Microsoft.DotNet.ProjectJsonMigration.Tests.csproj
	test/Microsoft.DotNet.Tools.Tests.Utilities/Microsoft.DotNet.Tools.Tests.Utilities.csproj
	test/binding-redirects.Tests/binding-redirects.Tests.csproj
	test/crossgen.Tests/crossgen.Tests.csproj
	test/dotnet-add-package.Tests/dotnet-add-package.Tests.csproj
	test/dotnet-add-reference.Tests/dotnet-add-reference.Tests.csproj
	test/dotnet-build.Tests/dotnet-build.Tests.csproj
	test/dotnet-help.Tests/dotnet-help.Tests.csproj
	test/dotnet-list-reference.Tests/dotnet-list-reference.Tests.csproj
	test/dotnet-migrate.Tests/dotnet-migrate.Tests.csproj
	test/dotnet-msbuild.Tests/dotnet-msbuild.Tests.csproj
	test/dotnet-new.Tests/dotnet-new.Tests.csproj
	test/dotnet-nuget.UnitTests/dotnet-nuget.UnitTests.csproj
	test/dotnet-pack.Tests/dotnet-pack.Tests.csproj
	test/dotnet-publish.Tests/dotnet-publish.Tests.csproj
	test/dotnet-remove-reference.Tests/dotnet-remove-reference.Tests.csproj
	test/dotnet-restore.Tests/dotnet-restore.Tests.csproj
	test/dotnet-run.Tests/dotnet-run.Tests.csproj
	test/dotnet-sln-add.Tests/dotnet-sln-add.Tests.csproj
	test/dotnet-sln-list.Tests/dotnet-sln-list.Tests.csproj
	test/dotnet-sln-remove.Tests/dotnet-sln-remove.Tests.csproj
	test/dotnet-test.Tests/dotnet-test.Tests.csproj
	test/dotnet-vstest.Tests/dotnet-vstest.Tests.csproj
	test/dotnet.Tests/dotnet.Tests.csproj
	test/msbuild.IntegrationTests/msbuild.IntegrationTests.csproj
	tools/Archiver/Archiver.csproj
This commit is contained in:
Piotr Puszkiewicz 2017-02-17 02:00:05 -08:00
commit 85b2a129db
51 changed files with 442 additions and 116 deletions

View file

@ -23,7 +23,7 @@ namespace Microsoft.DotNet.Tests
private const string TestProjectName = "AppWithToolDependency";
[Fact]
public void It_returns_null_when_CommandName_is_null()
public void ItReturnsNullWhenCommandNameIsNull()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -40,7 +40,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_returns_null_when_ProjectDirectory_is_null()
public void ItReturnsNullWhenProjectDirectoryIsNull()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_returns_null_when_ProjectDirectory_does_not_contain_a_project_file()
public void ItReturnsNullWhenProjectDirectoryDoesNotContainAProjectFile()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -76,7 +76,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_returns_null_when_CommandName_does_not_exist_in_ProjectTools()
public void ItReturnsNullWhenCommandNameDoesNotExistInProjectTools()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -98,7 +98,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_returns_a_CommandSpec_with_DOTNET_as_FileName_and_CommandName_in_Args_when_CommandName_exists_in_ProjectTools()
public void ItReturnsACommandSpecWithDOTNETAsFileNameAndCommandNameInArgsWhenCommandNameExistsInProjectTools()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -126,7 +126,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_escapes_CommandArguments_when_returning_a_CommandSpec()
public void ItEscapesCommandArgumentsWhenReturningACommandSpec()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -149,7 +149,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_returns_a_CommandSpec_with_Args_containing_CommandPath_when_returning_a_CommandSpec_and_CommandArguments_are_null()
public void ItReturnsACommandSpecWithArgsContainingCommandPathWhenReturningACommandSpecAndCommandArgumentsAreNull()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -174,7 +174,32 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_writes_a_deps_json_file_next_to_the_lockfile()
public void ItReturnsACommandSpecWithArgsContainingCommandPathWhenInvokingAToolReferencedWithADifferentCasing()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
var testInstance = TestAssets.Get(TestProjectName)
.CreateInstance()
.WithSourceFiles()
.WithRestoreFiles();
var commandResolverArguments = new CommandResolverArguments()
{
CommandName = "dotnet-prefercliruntime",
CommandArguments = null,
ProjectDirectory = testInstance.Root.FullName
};
var result = projectToolsCommandResolver.Resolve(commandResolverArguments);
result.Should().NotBeNull();
var commandPath = result.Args.Trim('"');
commandPath.Should().Contain("dotnet-prefercliruntime.dll");
}
[Fact]
public void ItWritesADepsJsonFileNextToTheLockfile()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -221,7 +246,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void Generate_deps_json_method_doesnt_overwrite_when_deps_file_already_exists()
public void GenerateDepsJsonMethodDoesntOverwriteWhenDepsFileAlreadyExists()
{
var testInstance = TestAssets.Get(TestProjectName)
.CreateInstance()
@ -262,7 +287,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_adds_fx_version_as_a_param_when_the_tool_has_the_prefercliruntime_file()
public void ItAddsFxVersionAsAParamWhenTheToolHasThePrefercliruntimeFile()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();
@ -286,7 +311,7 @@ namespace Microsoft.DotNet.Tests
}
[Fact]
public void It_does_not_add_fx_version_as_a_param_when_the_tool_does_not_have_the_prefercliruntime_file()
public void ItDoesNotAddFxVersionAsAParamWhenTheToolDoesNotHaveThePrefercliruntimeFile()
{
var projectToolsCommandResolver = SetupProjectToolsCommandResolver();