public SignalRForceCommandUtilizationStrategy(ICommandUtilizationUpdateStrategy commandUtilizationUpdateStrategy, ISignalRHubConnectionService signalRHubConnectionService, ICommandEnumerationJsonConvertProvider commandEnumerationJsonConvertProvider, IRemoteUserProvider remoteUserProvider)
            : base(commandUtilizationUpdateStrategy, signalRHubConnectionService, commandEnumerationJsonConvertProvider, remoteUserProvider)
        {
            this.commandEnumerationJsonConvertProvider = commandEnumerationJsonConvertProvider;

            this.commands = new LinkedList <ICommand>();
        }
示例#2
0
        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;
        }
示例#3
0
        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)));
        }