Skip to content

Commit

Permalink
Add a test.
Browse files Browse the repository at this point in the history
  • Loading branch information
mayuki committed Jan 15, 2020
1 parent f9f25a7 commit 135191e
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ public void BuiltInPrimaryCommand()
commands.Primary.Should().NotBeNull();
}

[Fact]
public void RewriteCommandNamesAsLowerCase()
{
var provider = new CoconaBuiltInCommandProvider(new CoconaCommandProvider(new[] { typeof(CommandTestBuiltInPrimaryCommand) }));
var commands = provider.GetCommandCollection();
commands.Should().NotBeNull();
commands.All.Should().HaveCount(3); // A, B, BuiltInPrimary
commands.All[0].Name.Should().Be("a");
commands.All[1].Name.Should().Be("b");
commands.Primary.Should().NotBeNull();
}

public class CommandTestBuiltInPrimaryCommand
{
public void A() { }
Expand Down

0 comments on commit 135191e

Please sign in to comment.