Exemplo n.º 1
0
        public void PrepareTest()
        {
            var actionInfoRegistry = new CommandRegistry();

            actionInfoRegistry.Init(new MockPluginLoader());
            _actionInfoDiscover = new CommandRepository(actionInfoRegistry);
        }
Exemplo n.º 2
0
        public void Init_WithProvider_Should_Ok()
        {
            var actionInfoRegistry = new CommandRegistry();

            actionInfoRegistry.Init(new MockPluginLoader());
            actionInfoRegistry.Commands.LogJson();
            actionInfoRegistry.Commands.Count.ShouldEqual(6);
        }
Exemplo n.º 3
0
        public void Init_Null_Should_Throws()
        {
            var actionInfoRegistry = new CommandRegistry();

            AssertHelper.ShouldThrows <ArgumentNullException>(() =>
            {
                actionInfoRegistry.Init(null);
            });
        }
Exemplo n.º 4
0
        public void Init_NotInvoke_Should_Empty()
        {
            var actionInfoRegistry = new CommandRegistry();

            actionInfoRegistry.Commands.Count.ShouldEqual(0);
        }
Exemplo n.º 5
0
 public CommandRepository(CommandRegistry registry)
 {
     _registry = registry ?? throw new ArgumentNullException(nameof(registry));
 }