public void PrepareTest() { var actionInfoRegistry = new CommandRegistry(); actionInfoRegistry.Init(new MockPluginLoader()); _actionInfoDiscover = new CommandRepository(actionInfoRegistry); }
public void Init_WithProvider_Should_Ok() { var actionInfoRegistry = new CommandRegistry(); actionInfoRegistry.Init(new MockPluginLoader()); actionInfoRegistry.Commands.LogJson(); actionInfoRegistry.Commands.Count.ShouldEqual(6); }
public void Init_Null_Should_Throws() { var actionInfoRegistry = new CommandRegistry(); AssertHelper.ShouldThrows <ArgumentNullException>(() => { actionInfoRegistry.Init(null); }); }
public void Init_NotInvoke_Should_Empty() { var actionInfoRegistry = new CommandRegistry(); actionInfoRegistry.Commands.Count.ShouldEqual(0); }
public CommandRepository(CommandRegistry registry) { _registry = registry ?? throw new ArgumentNullException(nameof(registry)); }