Add dummy tests to cover difficult scenarios

This commit is contained in:
Alexey Golub
2020-01-29 22:19:37 +02:00
parent 4fdf543190
commit 515d51a91d
6 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System.Threading.Tasks;
using CliFx.Attributes;
namespace CliFx.Tests.Dummy.Commands
{
[Command]
public class HelloWorldCommand : ICommand
{
[CommandOption("target", EnvironmentVariableName = "ENV_TARGET")]
public string Target { get; set; } = "World";
public ValueTask ExecuteAsync(IConsole console)
{
console.Output.WriteLine($"Hello {Target}!");
return default;
}
}
}