Use backwards compatible runtimes for app throwing exception tests

This commit is contained in:
Daniel Plaisted 2017-04-27 13:45:12 -07:00
parent af9a85fd3f
commit b972f8229e

View file

@ -28,9 +28,9 @@ 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 RunCommand()
new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(appRoot)
.ExecuteWithCapturedOutput()
.ExecuteWithCapturedOutput("run")
.Should().Fail()
.And.HaveStdErrContaining(msg1)
.And.HaveStdErrContaining(msg2);
@ -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 DotnetCommand()
new DotnetCommand(DotnetUnderTest.WithBackwardsCompatibleRuntimes)
.WithWorkingDirectory(appWithToolDepRoot)
.ExecuteWithCapturedOutput("throwingtool")
.Should().Fail()