Skip to content

Commit

Permalink
Add test for CommandExists
Browse files Browse the repository at this point in the history
  • Loading branch information
Perry committed Aug 25, 2023
1 parent fb8b3f6 commit 3336a92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CommandExec.Tests/EnvironmentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ public void ShellCommandTest()
// string STDErr = shell.STDErr.ReadToEnd().TrimEnd();
// Assert.Equal(string.Empty, STDErr);
}

[Fact(DisplayName = "Check if command exists")]
public void CommandExistsTest()
{
Assert.True(CommandUtils.CommandExists("type"));
Assert.False(CommandUtils.CommandExists("fake-test-command-that-is-not-real"));
}
}

0 comments on commit 3336a92

Please sign in to comment.