Index: Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.IO.Test/Exporters/MacroStabilityInwardsCalculationExporterTest.cs =================================================================== diff -u -ra206b997ecdc2e76de7d46e3f39ee4fa467629ea -rf08d80ff73aa6e92788ad00f00f1128257b5f287 --- Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.IO.Test/Exporters/MacroStabilityInwardsCalculationExporterTest.cs (.../MacroStabilityInwardsCalculationExporterTest.cs) (revision a206b997ecdc2e76de7d46e3f39ee4fa467629ea) +++ Riskeer/MacroStabilityInwards/test/Riskeer.MacroStabilityInwards.IO.Test/Exporters/MacroStabilityInwardsCalculationExporterTest.cs (.../MacroStabilityInwardsCalculationExporterTest.cs) (revision f08d80ff73aa6e92788ad00f00f1128257b5f287) @@ -133,21 +133,24 @@ MacroStabilityInwardsCalculationScenario calculation = MacroStabilityInwardsCalculationScenarioTestFactory.CreateMacroStabilityInwardsCalculationScenarioWithValidInput(new TestHydraulicBoundaryLocation()); calculation.Output = MacroStabilityInwardsOutputTestFactory.CreateRandomOutput(); - var persistenceFactory = new MacroStabilityInwardsTestPersistenceFactory + using (new MacroStabilityInwardsCalculatorFactoryConfig()) { - ThrowException = true - }; + var persistenceFactory = new MacroStabilityInwardsTestPersistenceFactory + { + ThrowException = true + }; - var exporter = new MacroStabilityInwardsCalculationExporter(calculation, persistenceFactory, filePath, AssessmentSectionTestHelper.GetTestAssessmentLevel); + var exporter = new MacroStabilityInwardsCalculationExporter(calculation, persistenceFactory, filePath, AssessmentSectionTestHelper.GetTestAssessmentLevel); - // Call - var exportResult = true; - void Call() => exportResult = exporter.Export(); + // Call + var exportResult = true; + void Call() => exportResult = exporter.Export(); - // Assert - string expectedMessage = $"Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{filePath}'. Er is geen D-GEO Suite Stability Project geƫxporteerd."; - TestHelper.AssertLogMessageWithLevelIsGenerated(Call, new Tuple(expectedMessage, LogLevelConstant.Error)); - Assert.IsFalse(exportResult); + // Assert + string expectedMessage = $"Er is een onverwachte fout opgetreden tijdens het schrijven van het bestand '{filePath}'. Er is geen D-GEO Suite Stability Project geƫxporteerd."; + TestHelper.AssertLogMessageWithLevelIsGenerated(Call, new Tuple(expectedMessage, LogLevelConstant.Error)); + Assert.IsFalse(exportResult); + } } [Test]