Index: Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ViewInfos/HeightStructuresScenariosViewInfoTest.cs =================================================================== diff -u -r54af7d44eb955fbef43211dd642a4a7264d68db1 -rd9fc90deb21b73411e4ecccc4405da3122d38999 --- Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ViewInfos/HeightStructuresScenariosViewInfoTest.cs (.../HeightStructuresScenariosViewInfoTest.cs) (revision 54af7d44eb955fbef43211dd642a4a7264d68db1) +++ Riskeer/HeightStructures/test/Riskeer.HeightStructures.Plugin.Test/ViewInfos/HeightStructuresScenariosViewInfoTest.cs (.../HeightStructuresScenariosViewInfoTest.cs) (revision d9fc90deb21b73411e4ecccc4405da3122d38999) @@ -157,6 +157,35 @@ } [Test] + public void CloseForData_ViewNotCorrespondingToRemovedFailureMechanism_ReturnFalse() + { + using (var view = new HeightStructuresScenariosView(new CalculationGroup(), new HeightStructuresFailureMechanism())) + { + // Call + bool closeForData = info.CloseForData(view, new HeightStructuresFailureMechanism()); + + // Assert + Assert.IsFalse(closeForData); + } + } + + [Test] + public void CloseForData_ViewCorrespondingToRemovedFailureMechanism_ReturnTrue() + { + // Setup + var correspondingFailureMechanism = new HeightStructuresFailureMechanism(); + + using (var view = new HeightStructuresScenariosView(correspondingFailureMechanism.CalculationsGroup, correspondingFailureMechanism)) + { + // Call + bool closeForData = info.CloseForData(view, correspondingFailureMechanism); + + // Assert + Assert.IsTrue(closeForData); + } + } + + [Test] public void CloseForData_AssessmentSectionRemovedWithoutHeightStructuresFailureMechanism_ReturnFalse() { // Setup