Index: Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs =================================================================== diff -u -r61849787ccd3c614e8ad17e2bf78a69aeb50d3f6 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 61849787ccd3c614e8ad17e2bf78a69aeb50d3f6) +++ Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -158,11 +158,6 @@ var dataGridView = (DataGridView)new ControlTester("dataGridView").TheObject; - // Make sure the cell is not in edit mode when setting the current cell. - dataGridView.EditMode = DataGridViewEditMode.EditProgrammatically; - - control.AddTextBoxColumn("Test property", "Test header"); - // Call dataGridView.DataSource = dataSource; Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -rf5a2d607a5b8053b232c1f3ad572a0acba6a4e3a -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision f5a2d607a5b8053b232c1f3ad572a0acba6a4e3a) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -24,6 +24,9 @@ using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.GrassCoverErosionInwards.Data; @@ -68,23 +71,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new GrassCoverErosionInwardsFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new GrassCoverErosionInwardsFailureMechanismSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -rf5a2d607a5b8053b232c1f3ad572a0acba6a4e3a -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision f5a2d607a5b8053b232c1f3ad572a0acba6a4e3a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -24,6 +24,9 @@ using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.HeightStructures.Data; @@ -68,23 +71,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new HeightStructuresFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new HeightStructuresFailureMechanismSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionItemRow.cs =================================================================== diff -u -r61849787ccd3c614e8ad17e2bf78a69aeb50d3f6 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionItemRow.cs (.../FailureMechanismContributionItemRow.cs) (revision 61849787ccd3c614e8ad17e2bf78a69aeb50d3f6) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionItemRow.cs (.../FailureMechanismContributionItemRow.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -47,7 +47,7 @@ } /// - /// Gets the name of the . + /// Gets . /// public string Assessment { @@ -58,7 +58,7 @@ } /// - /// Returns the code of the + /// Gets . /// public string Code { @@ -69,7 +69,7 @@ } /// - /// Gets the amount of contribution of the as a percentage. + /// Gets . /// public double Contribution { @@ -80,7 +80,7 @@ } /// - /// Gets or sets the norm of the . + /// Gets . /// public int Norm { @@ -91,7 +91,7 @@ } /// - /// Gets the probability space of the . + /// Gets . /// public double ProbabilitySpace { @@ -102,7 +102,7 @@ } /// - /// Gets or sets the isRelevant of the + /// Gets or sets . /// public bool IsRelevant { Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionItemRowTest.cs =================================================================== diff -u -r61849787ccd3c614e8ad17e2bf78a69aeb50d3f6 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionItemRowTest.cs (.../FailureMechanismContributionItemRowTest.cs) (revision 61849787ccd3c614e8ad17e2bf78a69aeb50d3f6) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/FailureMechanismContributionItemRowTest.cs (.../FailureMechanismContributionItemRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -22,6 +22,9 @@ using System; using Core.Common.Base; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.Contribution; using Ringtoets.Integration.Forms.Views; using Ringtoets.Piping.Data; @@ -68,25 +71,26 @@ public void IsRelevant_AlwaysOnChange_NotifyFailureMechanismObserversAndCalculationPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var pipingFailureMechanism = new PipingFailureMechanism(); + pipingFailureMechanism.Attach(observer); + var norm = 10; var contributionItem = new FailureMechanismContributionItem(pipingFailureMechanism, norm); var row = new FailureMechanismContributionItemRow(contributionItem); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = pipingFailureMechanism - }) - { - // Call - row.IsRelevant = newValue; + // Call + row.IsRelevant = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, contributionItem.IsRelevant); - } + // Assert + Assert.AreEqual(newValue, contributionItem.IsRelevant); + + mocks.VerifyAll(); } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/ClosingStructureSectionResultRowTest.cs =================================================================== diff -u -rf72f906a6875250a4378945ce814997ff8aaf1a7 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/ClosingStructureSectionResultRowTest.cs (.../ClosingStructureSectionResultRowTest.cs) (revision f72f906a6875250a4378945ce814997ff8aaf1a7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/ClosingStructureSectionResultRowTest.cs (.../ClosingStructureSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -25,6 +25,9 @@ using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; @@ -81,23 +84,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new ClosingStructureFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new ClosingStructureSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverErosionOutwardsSectionResultRowTest.cs =================================================================== diff -u -rf72f906a6875250a4378945ce814997ff8aaf1a7 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverErosionOutwardsSectionResultRowTest.cs (.../GrassCoverErosionOutwardsSectionResultRowTest.cs) (revision f72f906a6875250a4378945ce814997ff8aaf1a7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverErosionOutwardsSectionResultRowTest.cs (.../GrassCoverErosionOutwardsSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -24,6 +24,9 @@ using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; @@ -68,23 +71,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new GrassCoverErosionOutwardsFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new GrassCoverErosionOutwardsSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs =================================================================== diff -u -rf72f906a6875250a4378945ce814997ff8aaf1a7 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs (.../MacrostabilityInwardsSectionResultRowTest.cs) (revision f72f906a6875250a4378945ce814997ff8aaf1a7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs (.../MacrostabilityInwardsSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -25,6 +25,9 @@ using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; @@ -81,23 +84,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new MacrostabilityInwardsFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new MacrostabilityInwardsSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/TechnicalInnovationSectionResultRowTest.cs =================================================================== diff -u -rf72f906a6875250a4378945ce814997ff8aaf1a7 -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/TechnicalInnovationSectionResultRowTest.cs (.../TechnicalInnovationSectionResultRowTest.cs) (revision f72f906a6875250a4378945ce814997ff8aaf1a7) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/TechnicalInnovationSectionResultRowTest.cs (.../TechnicalInnovationSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -24,6 +24,9 @@ using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Integration.Data.StandAlone.SectionResults; @@ -67,23 +70,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new TechnicalInnovationFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new TechnicalInnovationSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs =================================================================== diff -u -r028fa7ac2f1cc6bec17d9db071064febd4f6261b -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision 028fa7ac2f1cc6bec17d9db071064febd4f6261b) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationRowTest.cs (.../PipingCalculationRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -25,6 +25,9 @@ using Core.Common.Base.Data; using Core.Common.Controls.DataGrid; using NUnit.Framework; + +using Rhino.Mocks; + using Ringtoets.HydraRing.Data; using Ringtoets.Piping.Data; using Ringtoets.Piping.Data.TestUtil; @@ -76,22 +79,23 @@ public void IsRelevant_AlwaysOnChange_NotifyObserversAndCalculationPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var calculation = PipingCalculationFactory.CreateCalculationWithValidInput(); + calculation.Attach(observer); + var row = new PipingCalculationRow(calculation); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = calculation - }) - { - // Call - row.IsRelevant = newValue; + // Call + row.IsRelevant = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, calculation.IsRelevant); - } + // Assert + Assert.AreEqual(newValue, calculation.IsRelevant); + + mocks.VerifyAll(); } [Test] Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismSectionResultRowTest.cs =================================================================== diff -u -rf5a2d607a5b8053b232c1f3ad572a0acba6a4e3a -rbd3056331b8727d6f9758d1f4e5979694d439398 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismSectionResultRowTest.cs (.../PipingFailureMechanismSectionResultRowTest.cs) (revision f5a2d607a5b8053b232c1f3ad572a0acba6a4e3a) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingFailureMechanismSectionResultRowTest.cs (.../PipingFailureMechanismSectionResultRowTest.cs) (revision bd3056331b8727d6f9758d1f4e5979694d439398) @@ -71,23 +71,24 @@ public void AssessmentLayerOne_AlwaysOnChange_NotifyObserversOfResultAndResultPropertyChanged(bool newValue) { // Setup + var mocks = new MockRepository(); + var observer = mocks.StrictMock(); + observer.Expect(o => o.UpdateObserver()); + mocks.ReplayAll(); + var section = CreateSection(); var result = new PipingFailureMechanismSectionResult(section); + result.Attach(observer); + var row = new PipingFailureMechanismSectionResultRow(result); - int counter = 0; - using (new Observer(() => counter++) - { - Observable = result - }) - { - // Call - row.AssessmentLayerOne = newValue; + // Call + row.AssessmentLayerOne = newValue; - // Assert - Assert.AreEqual(1, counter); - Assert.AreEqual(newValue, result.AssessmentLayerOne); - } + // Assert + Assert.AreEqual(newValue, result.AssessmentLayerOne); + + mocks.VerifyAll(); } [Test]