Refactor tests and add best-effort tests for HelpTextRenderer

This commit is contained in:
Alexey Golub
2019-08-19 22:49:21 +03:00
parent 3017c3d6c3
commit dd882a6372
15 changed files with 300 additions and 137 deletions

View File

@@ -1,35 +1,11 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using CliFx.Attributes;
using CliFx.Exceptions;
using CliFx.Services;
using FluentAssertions;
using NUnit.Framework;
namespace CliFx.Tests
{
public partial class CliApplicationTests
{
[Command]
private class TestDefaultCommand : ICommand
{
public Task ExecuteAsync(IConsole console) => Task.CompletedTask;
}
[Command("command")]
private class TestNamedCommand : ICommand
{
public Task ExecuteAsync(IConsole console) => Task.CompletedTask;
}
[Command("faulty command")]
private class TestFaultyCommand : ICommand
{
public Task ExecuteAsync(IConsole console) => Task.FromException(new CommandException(-1337));
}
}
[TestFixture]
public partial class CliApplicationTests
{