Account for non-installed templates when preparing test run

This commit is contained in:
Steve Sanderson 2017-09-11 17:41:24 +01:00
parent 5eeee55b13
commit cb500fe3b8
1 changed files with 5 additions and 1 deletions

View File

@ -41,7 +41,11 @@ namespace Templates.Test.Helpers
Directory.GetCurrentDirectory(),
"dotnet",
$"new --uninstall {packageName}");
proc.WaitForExit(assertSuccess: true);
// We don't need this command to succeed, because we'll verify next that
// uninstallation had the desired effect. This command is expected to fail
// in the case where the package wasn't previously installed.
proc.WaitForExit(assertSuccess: false);
}
VerifyCannotFindTemplate(output, "ASP.NET Core Empty");