Move remaining TestCommand("dotnet")
to DotnetCommand
This commit is contained in:
parent
69ba7095e5
commit
9d2d633d1c
4 changed files with 7 additions and 7 deletions
|
@ -67,7 +67,7 @@ namespace Microsoft.DotNet.Cli.Utils.Tests
|
||||||
string msg1 = "Unhandled Exception: AppThrowing.MyException: "
|
string msg1 = "Unhandled Exception: AppThrowing.MyException: "
|
||||||
+ "Exception of type 'AppThrowing.MyException' was thrown.";
|
+ "Exception of type 'AppThrowing.MyException' was thrown.";
|
||||||
string msg2 = "at AppThrowing.MyException.Main(String[] args)";
|
string msg2 = "at AppThrowing.MyException.Main(String[] args)";
|
||||||
new TestCommand("dotnet")
|
new DotnetCommand()
|
||||||
.WithWorkingDirectory(appWithToolDepRoot)
|
.WithWorkingDirectory(appWithToolDepRoot)
|
||||||
.ExecuteWithCapturedOutput("throwingtool")
|
.ExecuteWithCapturedOutput("throwingtool")
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
||||||
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.0")
|
var outputDll = testInstance.Root.GetDirectory("bin", configuration, "netcoreapp2.0")
|
||||||
.GetFile($"{testAppName}.dll");
|
.GetFile($"{testAppName}.dll");
|
||||||
|
|
||||||
var outputRunCommand = new TestCommand("dotnet");
|
var outputRunCommand = new DotnetCommand();
|
||||||
|
|
||||||
outputRunCommand.ExecuteWithCapturedOutput(outputDll.FullName)
|
outputRunCommand.ExecuteWithCapturedOutput(outputDll.FullName)
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
|
@ -72,7 +72,7 @@ namespace Microsoft.DotNet.Cli.Build.Tests
|
||||||
SearchOption.TopDirectoryOnly)
|
SearchOption.TopDirectoryOnly)
|
||||||
.Single();
|
.Single();
|
||||||
|
|
||||||
var outputRunCommand = new TestCommand("dotnet");
|
var outputRunCommand = new DotnetCommand();
|
||||||
|
|
||||||
outputRunCommand.ExecuteWithCapturedOutput(outputDll)
|
outputRunCommand.ExecuteWithCapturedOutput(outputDll)
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
|
|
|
@ -63,7 +63,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
||||||
|
|
||||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
|
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
|
||||||
|
|
||||||
new TestCommand("dotnet")
|
new DotnetCommand()
|
||||||
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
|
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
|
||||||
.ExecuteWithCapturedOutput(outputDll)
|
.ExecuteWithCapturedOutput(outputDll)
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
|
@ -101,7 +101,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
||||||
|
|
||||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
|
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
|
||||||
|
|
||||||
new TestCommand("dotnet")
|
new DotnetCommand()
|
||||||
.ExecuteWithCapturedOutput(outputDll)
|
.ExecuteWithCapturedOutput(outputDll)
|
||||||
.Should().Fail()
|
.Should().Fail()
|
||||||
.And.HaveStdErrContaining("assembly specified in the dependencies manifest was not found -- package: 'newtonsoft.json',");
|
.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");
|
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, _tfm, "publish", $"{testAppName}.dll");
|
||||||
|
|
||||||
new TestCommand("dotnet")
|
new DotnetCommand()
|
||||||
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
|
.WithEnvironmentVariable("DOTNET_SHARED_PACKAGES", localAssemblyCache)
|
||||||
.ExecuteWithCapturedOutput(outputDll)
|
.ExecuteWithCapturedOutput(outputDll)
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
|
||||||
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
|
||||||
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.0", "publish", $"{testAppName}.dll");
|
var outputDll = Path.Combine(testProjectDirectory, "bin", configuration, "netcoreapp2.0", "publish", $"{testAppName}.dll");
|
||||||
|
|
||||||
new TestCommand("dotnet")
|
new DotnetCommand()
|
||||||
.ExecuteWithCapturedOutput(outputDll)
|
.ExecuteWithCapturedOutput(outputDll)
|
||||||
.Should().Pass()
|
.Should().Pass()
|
||||||
.And.HaveStdOutContaining("Hello World");
|
.And.HaveStdOutContaining("Hello World");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue