Index: DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/Program.cs =================================================================== diff -u -r1630 -r1666 --- DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/Program.cs (.../Program.cs) (revision 1630) +++ DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/Program.cs (.../Program.cs) (revision 1666) @@ -85,14 +85,17 @@ CreateOutputTimeSeriesFileIfNeeded( commandLineArguments.TimeSeriesOutputFileName, - Path.GetDirectoryName(commandLineArguments.TimeSeriesOutputFileName)); + Path.GetDirectoryName(commandLineArguments.TimeSeriesOutputFileName)); + Logger.LogInfo("v18.1 - Deltares 2018"); + Logger.LogInfo("Model runner started"); program.StartCalculations( commandLineArguments.DamXFileName, commandLineArguments.TimeSeriesInputFileName, commandLineArguments.TimeSeriesOutputFileName, commandLineArguments.ParameterFileName, commandLineArguments.Filter); + Logger.LogInfo("Model runner ended"); } else { Index: DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/DamLiveIntegrationTest.cs =================================================================== diff -u -r1657 -r1666 --- DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/DamLiveIntegrationTest.cs (.../DamLiveIntegrationTest.cs) (revision 1657) +++ DamClients/DamLive/trunk/src/Deltares.DamLive.Tests/DamLiveIntegrationTest.cs (.../DamLiveIntegrationTest.cs) (revision 1666) @@ -38,7 +38,7 @@ { #region Test Setup - const string TestWorkingFolder = "LiveDikeIntegrationTestWorkingFolder"; + const string TestWorkingFolder = "LiveDikeIntegrationTestWork"; private const string TestDataFolder = @"TestData\DamLive\Set2"; private List locations; @@ -59,7 +59,7 @@ [TestFixtureTearDown] public void TearDownFixture() { - //IoHelper.RemoveTestWorkingDirectory(TestWorkingFolder); + IoHelper.RemoveTestWorkingDirectory(TestWorkingFolder); } [TearDown] @@ -74,8 +74,7 @@ { // create a random unique test directory name in the // test working folder - var actualTestPath = Guid.NewGuid().ToString().Replace("-", ""); - actualTestPath = Path.Combine(TestWorkingFolder, actualTestPath); + var actualTestPath = TestWorkingFolder; Directory.CreateDirectory(actualTestPath); DirectoryHelper.CopyRecursive(actualTestPath, TestDataFolder); Index: DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/DamEngineRunner.cs =================================================================== diff -u -r1656 -r1666 --- DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/DamEngineRunner.cs (.../DamEngineRunner.cs) (revision 1656) +++ DamClients/DamLive/trunk/src/Deltares.Dam.Application.Live/DamEngineRunner.cs (.../DamEngineRunner.cs) (revision 1666) @@ -12,6 +12,7 @@ using Deltares.DamEngine.Interface; using Deltares.DamEngine.Io; using Deltares.DamEngine.Io.XmlInput; +using Deltares.DamEngine.Io.XmlOutput; using Deltares.Standard.Application; using Deltares.Standard.Language; using Deltares.Standard.Logging; @@ -187,28 +188,46 @@ try { Input input = FillXmlInputFromDamUi.CreateInput(DamProjectData); -//#if DEBUG +#if DEBUG const string inputFilename = "InputFile.xml"; DamXmlSerialization.SaveInputAsXmlFile(inputFilename, input); -//#endif +#endif string inputXml = DamXmlSerialization.SaveInputAsXmlString(input); var damEngineInterface = new EngineInterface(inputXml); string validationMessages = damEngineInterface.Validate(); // now the validation messages should be deserialized. If any, they should be passed on to the Validator - // and checked for errors. IF errors are found, then no calculation. When no messages or only warnings then + // and checked for errors. If errors are found, then no calculation. When no messages or only warnings then // do calculate. For now, just check length if (string.IsNullOrEmpty(validationMessages)) { string outputXml = damEngineInterface.Run(); var output = DamXmlSerialization.LoadOutputFromXmlString(outputXml); FillDamUiFromXmlOutput.AddOutputToDamProjectData(DamProjectData, output); -//#if DEBUG +#if DEBUG const string outputFilename = "OutputFile.xml"; DamXmlSerialization.SaveOutputAsXmlFile(outputFilename, output); -//#endif - +#endif + foreach (var calculationMessage in output.Results.CalculationMessages) + { + switch (calculationMessage.MessageType) + { + case MessageMessageType.Info: + Logger.LogInfo(calculationMessage.Message1); + break; + case MessageMessageType.Warning: + Logger.LogWarning(calculationMessage.Message1); + break; + case MessageMessageType.Error: + Logger.LogError(calculationMessage.Message1); + break; + } + } } + else + { + // Todo: handle validation messages + } } catch (Exception e) {