Move remaining TestCommand("dotnet") to DotnetCommand

This commit is contained in:
Piotr Puszkiewicz 2017-03-16 01:31:16 -07:00
parent 69ba7095e5
commit 9d2d633d1c
4 changed files with 7 additions and 7 deletions

View file

@ -67,7 +67,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
string msg1 = "Unhandled Exception: AppThrowing.MyException: "
+ "Exception of type 'AppThrowing.MyException' was thrown.";
string msg2 = "at AppThrowing.MyException.Main(String[] args)";
new TestCommand("dotnet")
new DotnetCommand()
.WithWorkingDirectory(appWithToolDepRoot)
.ExecuteWithCapturedOutput("throwingtool")
.Should().Fail()

View file

@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.0")
.GetFile($"{testAppName}.dll");
var outputRunCommand = new TestCommand("dotnet");
var outputRunCommand = new DotnetCommand();
outputRunCommand.ExecuteWithCapturedOutput(outputDll.FullName)
.Should().Pass()
@ -72,7 +72,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
SearchOption.TopDirectoryOnly)
.Single();
var outputRunCommand = new TestCommand("dotnet");
var outputRunCommand = new DotnetCommand();
outputRunCommand.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()

View file

@ -63,7 +63,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()
@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.ExecuteWithCapturedOutput(outputDll)
.Should().Fail()
.And.HaveStdErrContaining("assembly specified in the dependencies manifest was not found -- package: 'newtonsoft.json',");
@ -160,7 +160,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()

View file

@ -38,7 +38,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.0", "publish", $"{testAppName}.dll");
new TestCommand("dotnet")
new DotnetCommand()
.ExecuteWithCapturedOutput(outputDll)
.Should().Pass()
.And.HaveStdOutContaining("Hello World");