-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5196d6
commit 1486c15
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Threading.Tasks; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace Affected.Cli.Tests | ||
{ | ||
/// <summary> | ||
/// Tests for the public API. | ||
/// Ensures that the CLI implements common stuff like --help | ||
/// </summary> | ||
public class AffectedCliDefaultsTests : BaseInvocationTest | ||
{ | ||
public AffectedCliDefaultsTests(ITestOutputHelper helper) | ||
: base(helper) | ||
{ | ||
} | ||
|
||
[Fact] | ||
public async Task When_help_should_output_help() | ||
{ | ||
var (output, exitCode) = | ||
await this.InvokeAsync("--help"); | ||
|
||
Assert.Equal(0, exitCode); | ||
|
||
Assert.Contains("Determines which projects are affected by a set of changes.", output); | ||
Assert.Contains("Usage:", output); | ||
Assert.Contains("dotnet-affected [command] [options]", output); | ||
} | ||
} | ||
} |