Add kestrel tests.

Tests will 'build', 'run', 'publish' and 'execute' a Kestrel Hello World server as a PortableFatApp and as a Standalone app.
This commit is contained in:
Sridhar Periyasamy 2016-04-04 17:51:36 -07:00
parent f665c28173
commit 8f00b95783
17 changed files with 766 additions and 25 deletions

View file

@ -2,6 +2,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using Microsoft.DotNet.Cli.Utils;
using System.Threading.Tasks;
namespace Microsoft.DotNet.Tools.Test.Utilities
{
@ -60,10 +61,10 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
public RunCommand(
string projectPath,
string framework="",
string configuration="",
bool preserveTemporary=false,
string appArgs="")
string framework = "",
string configuration = "",
bool preserveTemporary = false,
string appArgs = "")
: base("dotnet")
{
_projectPath = projectPath;
@ -78,12 +79,19 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
args = $"run {BuildArgs()} {args}";
return base.Execute(args);
}
public override CommandResult ExecuteWithCapturedOutput(string args = "")
{
args = $"run {BuildArgs()} {args}";
return base.ExecuteWithCapturedOutput(args);
}
public override Task<CommandResult> ExecuteAsync(string args = "")
{
args = $"run {BuildArgs()} {args}";
return base.ExecuteAsync(args);
}
private string BuildArgs()
{
return $"{ProjectPathOption} {FrameworkOption} {ConfigurationOption} {PreserveTemporaryOption} {AppArgsArgument}";