Example #1
0
    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);
    }
Example #2
0
 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;
 }