public void ThrowArgumentException_WhenLogFileParserEnginesDictionaryDoesNotContainTheRequestedKey() { // Arrange var guidStringProvider = new Mock <IGuidStringProvider>(); var logFileParserEngineFactory = new Mock <ILogFileParserEngineFactory>(); var engineId = "any engine id"; var logFileParserEngineManager = new LogFileParserEngineManager(guidStringProvider.Object, logFileParserEngineFactory.Object); // Act & Assert Assert.That( () => logFileParserEngineManager.StopLogFileParserEngine(engineId), Throws.InstanceOf <ArgumentException>().With.Message.Contains("Requested engine not found.")); }
public void ThrowArgumenException_WhenEngineIdParameterIsNull() { // Arrange var guidStringProvider = new Mock <IGuidStringProvider>(); var logFileParserEngineFactory = new Mock <ILogFileParserEngineFactory>(); var engineId = string.Empty; var logFileParserEngineManager = new LogFileParserEngineManager(guidStringProvider.Object, logFileParserEngineFactory.Object); // Act & Assert Assert.That( () => logFileParserEngineManager.StopLogFileParserEngine(engineId), Throws.InstanceOf <ArgumentException>().With.Message.Contains(nameof(engineId))); }