33 lines
989 B
C#
33 lines
989 B
C#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
using System;
|
|
using System.Diagnostics;
|
|
using Xunit;
|
|
|
|
namespace Microsoft.AspNetCore.AzureAppServices.FunctionalTests
|
|
{
|
|
public struct CommandResult
|
|
{
|
|
public static readonly CommandResult Empty = new CommandResult();
|
|
|
|
public ProcessStartInfo StartInfo { get; }
|
|
public int ExitCode { get; }
|
|
public string StdOut { get; }
|
|
public string StdErr { get; }
|
|
|
|
public CommandResult(ProcessStartInfo startInfo, int exitCode, string stdOut, string stdErr)
|
|
{
|
|
StartInfo = startInfo;
|
|
ExitCode = exitCode;
|
|
StdOut = stdOut;
|
|
StdErr = stdErr;
|
|
}
|
|
|
|
public void AssertSuccess()
|
|
{
|
|
Assert.True(0 == ExitCode, StdOut + Environment.NewLine + StdErr + Environment.NewLine);
|
|
}
|
|
}
|
|
}
|