Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs =================================================================== diff -u -r3ed8e00da47ef2780e79688a9902e12b674e4cc0 -r736f04ea6f24399148ab8efd7f3b03ae8f8f56b5 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 3ed8e00da47ef2780e79688a9902e12b674e4cc0) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/DesignWaterLevelCalculationActivityTest.cs (.../DesignWaterLevelCalculationActivityTest.cs) (revision 736f04ea6f24399148ab8efd7f3b03ae8f8f56b5) @@ -168,13 +168,13 @@ const double norm = 1.0 / 30; var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, locationName, 0, 0); - var testDesignWaterLevelCalculator = new TestDesignWaterLevelCalculator + var calculator = new TestDesignWaterLevelCalculator { Converged = true }; - var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(testDesignWaterLevelCalculator); + var calculatorFactory = mockRepository.StrictMock(); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(activityDescription); calculationMessageProvider.Stub(calc => calc.GetCalculationName(locationName)).Return(calculationName); @@ -202,7 +202,7 @@ Assert.AreEqual($"Berekening van '{calculationName}' beƫindigd.", messages[4]); }); - AssessmentLevelCalculationInput designWaterLevelCalculationInput = testDesignWaterLevelCalculator.ReceivedInputs.First(); + AssessmentLevelCalculationInput designWaterLevelCalculationInput = calculator.ReceivedInputs.First(); Assert.AreEqual(hydraulicBoundaryLocation.Id, designWaterLevelCalculationInput.HydraulicBoundaryLocationId); Assert.AreEqual(StatisticsConverter.ProbabilityToReliability(norm), designWaterLevelCalculationInput.Beta); @@ -255,14 +255,14 @@ const double expectedDesignWaterLevel = 3.5; var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(0, locationName, 0, 0); - var testDesignWaterLevelCalculator = new TestDesignWaterLevelCalculator + var calculator = new TestDesignWaterLevelCalculator { DesignWaterLevel = expectedDesignWaterLevel, Converged = true }; - var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(testDesignWaterLevelCalculator); + var calculatorFactory = mockRepository.StrictMock(); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); calculationMessageProvider.Expect(calc => calc.GetCalculationName(locationName)).Return(string.Empty).Repeat.AtLeastOnce(); @@ -294,14 +294,14 @@ const string locationName = "locationName"; const string calculationFailedMessage = "Something went wrong"; - var testDesignWaterLevelCalculator = new TestDesignWaterLevelCalculator + var calculator = new TestDesignWaterLevelCalculator { EndInFailure = true, LastErrorFileContent = calculationFailedMessage }; - var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(testDesignWaterLevelCalculator); + var calculatorFactory = mockRepository.StrictMock(); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(calculator); var calculationMessageProvider = mockRepository.Stub(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(string.Empty); calculationMessageProvider.Stub(calc => calc.GetCalculationName(locationName)).Return(string.Empty); @@ -342,13 +342,13 @@ const string activityDescription = "activityDescription"; const string calculationNotConvergedMessage = "GetCalculatedNotConvergedMessage"; - var testDesignWaterLevelCalculator = new TestDesignWaterLevelCalculator + var calculator = new TestDesignWaterLevelCalculator { Converged = false }; - var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(testDesignWaterLevelCalculator); + var calculatorFactory = mockRepository.StrictMock(); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Expect(calc => calc.GetActivityDescription(locationName)).Return(activityDescription); calculationMessageProvider.Expect(calc => calc.GetCalculationName(locationName)).Return("GetCalculationName").Repeat.AtLeastOnce(); @@ -401,14 +401,14 @@ double.NaN, CalculationConvergence.NotCalculated) }; - var testDesignWaterLevelCalculator = new TestDesignWaterLevelCalculator + var calculator = new TestDesignWaterLevelCalculator { EndInFailure = endInFailure, LastErrorFileContent = lastErrorFileContent }; - var calculatorFactory = mockRepository.Stub(); - calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(testDesignWaterLevelCalculator); + var calculatorFactory = mockRepository.StrictMock(); + calculatorFactory.Expect(cf => cf.CreateDesignWaterLevelCalculator(testDataPath)).Return(calculator); var calculationMessageProvider = mockRepository.StrictMock(); calculationMessageProvider.Stub(calc => calc.GetActivityDescription(locationName)).Return(locationName); calculationMessageProvider.Stub(calc => calc.GetCalculationName(locationName)).Return(locationName);