Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs =================================================================== diff -u -recf136a787efcd5d3f171f8aee8930f84a89e80a -r753480c9461b7b5bb10eb7abe78224f24160a536 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs (.../FailureMechanismContributionViewTest.cs) (revision ecf136a787efcd5d3f171f8aee8930f84a89e80a) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionViewTest.cs (.../FailureMechanismContributionViewTest.cs) (revision 753480c9461b7b5bb10eb7abe78224f24160a536) @@ -137,6 +137,7 @@ { // Setup const int returnPeriod = 200; + const double norm = 1.0/returnPeriod; AssessmentSection assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); FailureMechanismContribution failureMechanismContribution = assessmentSection.FailureMechanismContribution; @@ -150,7 +151,7 @@ var handler = mockRepository.StrictMock(); handler.Expect(h => h.ConfirmNormChange()).Return(true); - handler.Expect(h => h.ChangeNorm(assessmentSection, returnPeriod)) + handler.Expect(h => h.ChangeNorm(assessmentSection, norm)) .Return(new[] { observable1, @@ -276,7 +277,7 @@ var initialContribution = new FailureMechanismContribution(new[] { someMechanism - }, otherContribution, 100); + }, otherContribution, 0.01); using (var distributionView = new FailureMechanismContributionView(handler) { @@ -956,7 +957,8 @@ public void GivenView_WhenEnterAfterEnteringDifferentNormNotCommitted_CommitValueAndChangeData() { // Given - const int normValue = 200; + const int returnPeriod = 200; + const double norm = 1.0/returnPeriod; AssessmentSection assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike); FailureMechanismContribution failureMechanismContribution = assessmentSection.FailureMechanismContribution; @@ -965,7 +967,7 @@ var handler = mocks.StrictMock(); handler.Expect(h => h.ConfirmNormChange()) .Return(true); - handler.Expect(h => h.ChangeNorm(assessmentSection, normValue)) + handler.Expect(h => h.ChangeNorm(assessmentSection, norm)) .Return(Enumerable.Empty()); mocks.ReplayAll(); @@ -981,15 +983,15 @@ // When var normInput = (NumericUpDown) normTester.TheObject; view.ActiveControl = normInput; - normInput.Value = normValue; + normInput.Value = returnPeriod; var keyEventArgs = new KeyEventArgs(Keys.Enter); EventHelper.RaiseEvent(normInput.Controls.OfType().First(), "KeyDown", keyEventArgs); // Then Assert.IsTrue(keyEventArgs.Handled); Assert.IsTrue(keyEventArgs.SuppressKeyPress); - Assert.AreEqual(normValue, normInput.Value); + Assert.AreEqual(returnPeriod, normInput.Value); Assert.AreNotSame(normInput, view.ActiveControl); } mocks.VerifyAll();