Пример #1
0
        public void TryGetCommand_Unknown()
        {
            var matcher = new CoconaCommandMatcher();
            var result  = matcher.TryGetCommand("null", CreateCommandCollection(CreateCommand("A", Array.Empty <ICommandParameterDescriptor>())), out var command);

            result.Should().BeFalse();
            command.Should().BeNull();
        }
Пример #2
0
        public void TryGetCommand_Empty()
        {
            var matcher = new CoconaCommandMatcher();
            var result  = matcher.TryGetCommand("A", CreateCommandCollection(), out var command);

            result.Should().BeFalse();
            command.Should().BeNull();
        }
Пример #3
0
        public void TryGetCommand_Multiple()
        {
            var matcher = new CoconaCommandMatcher();
            var result  = matcher.TryGetCommand("A", CreateCommandCollection(CreateCommand("A", Array.Empty <ICommandParameterDescriptor>()), CreateCommand("B", Array.Empty <ICommandParameterDescriptor>())), out var command);

            result.Should().BeTrue();
            command.Should().NotBeNull();
        }