Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataCalculationServiceTest.cs =================================================================== diff -u -rf4f041e353f89e0e93a4243968acee599b2186a7 -rab0d105b9a42cd88f3d112314e2d079755bfd91b --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataCalculationServiceTest.cs (.../RingtoetsCommonDataCalculationServiceTest.cs) (revision f4f041e353f89e0e93a4243968acee599b2186a7) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataCalculationServiceTest.cs (.../RingtoetsCommonDataCalculationServiceTest.cs) (revision ab0d105b9a42cd88f3d112314e2d079755bfd91b) @@ -59,41 +59,22 @@ } [Test] - public void ProfileSpecificRequiredProbability_WithValidParameters_ReturnSpecificProbability() + [TestCase(0, 0)] + [TestCase(10, 0.00025)] + public void ProfileSpecificRequiredProbability_WithValidParameters_ReturnSpecificProbability(double contribution, double expectedProfileSpecificRequiredProbability) { // Setup const double norm = 1.0/200; - const double contribution = 10; const int n = 2; // Call double probability = RingtoetsCommonDataCalculationService.ProfileSpecificRequiredProbability(norm, contribution, n); // Assert - Assert.AreEqual(0.00025, probability); + Assert.AreEqual(expectedProfileSpecificRequiredProbability, probability); } [Test] - [TestCase(-1.0)] - [TestCase(0.0)] - public void ProfileSpecificRequiredProbability_WithZeroContribution_ThrowsArgumentException(double contribution) - { - // Setup - const double norm = 1.0/200; - const int n = 2; - - // Call - TestDelegate action = () => RingtoetsCommonDataCalculationService.ProfileSpecificRequiredProbability(norm, contribution, n); - - // Assert - ArgumentOutOfRangeException exception = Assert.Throws(action); - Assert.AreEqual(contribution, exception.ActualValue); - Assert.AreEqual("failureMechanismContribution", exception.ParamName); - StringAssert.StartsWith("De bijdrage van dit toetsspoor is nul of negatief. Daardoor is de doorsnede-eis onbepaald en kan de berekening niet worden uitgevoerd." + - Environment.NewLine, exception.Message); - } - - [Test] public void ProfileSpecificRequiredProbability_WithZeroN_ThrowsArgumentException() { // Setup