public void Given_test_registry_with_some_items()
        {
            var registry = new SimpleCommandRegistry
                               {
                                   new CommandInfo
                                       {
                                           Key = "Some.Key",
                                           Aliases = new[] {"Key1", "Key2"},
                                           Type = new TypeStub("Key", "Some")
                                       },

                                    new CommandInfo
                                       {
                                           Key = "Some.AnotherKey",
                                           Aliases = new[] {"AnKey1"},
                                           Type = new TypeStub("AnotherKey", "Some")
                                       },

                                    new CommandInfo
                                       {
                                           Key = "Some.FooKey",
                                           Aliases = new[] {"FooKey"},
                                           Type = new TypeStub("FooKey", "Some")
                                       },
                               };

            _commandResolver = new CommandResolver(new ServerContext
                                                       (
                                                           registry: registry
                                                       ));
        }
Beispiel #2
0
 public CommandsController(ServerContext context)
 {
     _context = context ?? new ServerContext();
     _resolver = new CommandResolver(_context);
     _runner = new CommandRunner(_context);
     _executor = new CommandsExecutor(_context);
 }
Beispiel #3
0
 public CommandsService(ServerContext context = null)
 {
     _context = context ?? new ServerContext();
     _resolver = new CommandResolver(_context);
     _runner = new CommandRunner(_context);
 }