mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Refactor tests and add best-effort tests for HelpTextRenderer
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user