Remove TAM (#5670)
* remove reference to TestAssetsManager in dotnet-add-reference * remove TestAssetsManager dependency from dotnet-build * remove TAM ref from dotnet-list-reference * remove TAM dependency from dotnet-msbuild * remove TAM dependency from ProjectJsonMigration tests * remove TAM dependency from dotnet.Tests * remove TAM dependency from dotnet-new.Tests * remove TAM from dotnet-pack.Tests * remove TAM from dotnet-publish.Tests * remove TAM from dotnet-restore.Tests * remove TAM dependency from dotnet-remove-reference.Tests * remove TAM dependency from dotnet-run.Tests * remove TAM dependency from dotnet-test.Tests * remove TAM dependency from Microsoft.DotNet.Cli.Utils.Tests * remove TAM from TestBase * remove TAM * remove newly introduced dependency on TAM
This commit is contained in:
parent
511d7e96a1
commit
a6bc22e499
30 changed files with 238 additions and 517 deletions
|
@ -29,10 +29,11 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
[Fact]
|
||||
public void ItRunsSpecifiedTargetsWithPropertiesCorrectly()
|
||||
{
|
||||
var testInstance = TestAssetsManager
|
||||
.CreateTestInstance("MSBuildBareBonesProject");
|
||||
var testInstance = TestAssets.Get("MSBuildBareBonesProject")
|
||||
.CreateInstance()
|
||||
.WithSourceFiles();
|
||||
|
||||
var testProjectDirectory = testInstance.TestRoot;
|
||||
var testProjectDirectory = testInstance.Root;
|
||||
|
||||
new MSBuildCommand()
|
||||
.WithWorkingDirectory(testProjectDirectory)
|
||||
|
@ -60,29 +61,22 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("build", true)]
|
||||
[InlineData("clean", true)]
|
||||
[InlineData("pack", true)]
|
||||
[InlineData("publish", true)]
|
||||
[InlineData("restore", true)]
|
||||
public void When_help_is_invoked_Then_MSBuild_extra_options_text_is_included_in_output(string commandName, bool isMSBuildCommand)
|
||||
[InlineData("build")]
|
||||
[InlineData("clean")]
|
||||
[InlineData("pack")]
|
||||
[InlineData("publish")]
|
||||
[InlineData("restore")]
|
||||
public void When_help_is_invoked_Then_MSBuild_extra_options_text_is_included_in_output(string commandName)
|
||||
{
|
||||
const string MSBuildHelpText = " Any extra options that should be passed to MSBuild. See 'dotnet msbuild -h' for available options.";
|
||||
|
||||
var projectDirectory = TestAssetsManager.CreateTestDirectory("ItContainsMSBuildHelpText");
|
||||
var projectDirectory = TestAssets.CreateTestDirectory(commandName);
|
||||
var result = new TestCommand("dotnet")
|
||||
.WithWorkingDirectory(projectDirectory.Path)
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput($"{commandName} --help");
|
||||
|
||||
result.ExitCode.Should().Be(0);
|
||||
if (isMSBuildCommand)
|
||||
{
|
||||
result.StdOut.Should().Contain(MSBuildHelpText);
|
||||
}
|
||||
else
|
||||
{
|
||||
result.StdOut.Should().NotContain(MSBuildHelpText);
|
||||
}
|
||||
result.StdOut.Should().Contain(MSBuildHelpText);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -121,9 +115,9 @@ namespace Microsoft.DotNet.Cli.MSBuild.Tests
|
|||
{
|
||||
const string AppArgumentsText = "Arguments passed to the application that is being run.";
|
||||
|
||||
var projectDirectory = TestAssetsManager.CreateTestDirectory("RunContainsAppArgumentsText");
|
||||
var projectDirectory = TestAssets.CreateTestDirectory("RunContainsAppArgumentsText");
|
||||
var result = new TestCommand("dotnet")
|
||||
.WithWorkingDirectory(projectDirectory.Path)
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.ExecuteWithCapturedOutput("run --help");
|
||||
|
||||
result.ExitCode.Should().Be(0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue