public SignalRForceCommandUtilizationStrategy(ICommandUtilizationUpdateStrategy commandUtilizationUpdateStrategy, ISignalRHubConnectionService signalRHubConnectionService, ICommandEnumerationJsonConvertProvider commandEnumerationJsonConvertProvider, IRemoteUserProvider remoteUserProvider) : base(commandUtilizationUpdateStrategy, signalRHubConnectionService, commandEnumerationJsonConvertProvider, remoteUserProvider) { this.commandEnumerationJsonConvertProvider = commandEnumerationJsonConvertProvider; this.commands = new LinkedList <ICommand>(); }
public LogFileParserHubService(ILogFileParserEngineManager logFileParserEngineManager, ICommandEnumerationJsonConvertProvider commandJsonConvertProvider) { Guard.WhenArgument(logFileParserEngineManager, nameof(ILogFileParserEngineManager)).IsNull().Throw(); Guard.WhenArgument(commandJsonConvertProvider, nameof(ICommandEnumerationJsonConvertProvider)).IsNull().Throw(); this.logFileParserEngineManager = logFileParserEngineManager; this.commandJsonConvertProvider = commandJsonConvertProvider; }
public void ThrowArgumentNullException_WhenIJsonConvertProviderParameterIsNull() { // Arrange var logFileParserEngineManager = new Mock <ILogFileParserEngineManager>(); ICommandEnumerationJsonConvertProvider commandJsonConvertProvider = null; // Act & Assert Assert.That( () => new LogFileParserHubService(logFileParserEngineManager.Object, commandJsonConvertProvider), Throws.InstanceOf <ArgumentNullException>().With.Message.Contains(nameof(ICommandEnumerationJsonConvertProvider))); }