public void InvalidControllerCtor( IToggleClientParser parser, IQueryHandler queryHandler, ICommandHandler cmdHandler, ILogger <TogglesController> logger) { void Create() => new TogglesController(parser, queryHandler, cmdHandler, logger); Assert.Throws <ArgumentNullException>((Action)Create); }
public TogglesController(IToggleClientParser toggleClientParser, IQueryHandler queryHandler, ICommandHandler commandHandler, ILogger <TogglesController> log) { ThrowOnNullArgument(toggleClientParser, nameof(toggleClientParser)); ThrowOnNullArgument(queryHandler, nameof(queryHandler)); ThrowOnNullArgument(commandHandler, nameof(commandHandler)); ThrowOnNullArgument(log, nameof(log)); _toggleClientParser = toggleClientParser; _queryHandler = queryHandler; _commandHandler = commandHandler; _log = log; }
public ToggleClientRepository(IToggleClientParser toggleClientParser) { ThrowOnNullArgument(toggleClientParser, nameof(toggleClientParser)); _toggleClientParser = toggleClientParser; }