Index: Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs =================================================================== diff -u -r5f606ac4712b01dafd9d17bd45a885d824e72d3b -r649c00f8c201652de091dcd9f7ac0e15bdbe0ae5 --- Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision 5f606ac4712b01dafd9d17bd45a885d824e72d3b) +++ Riskeer/Integration/src/Riskeer.Integration.Plugin/RiskeerPlugin.cs (.../RiskeerPlugin.cs) (revision 649c00f8c201652de091dcd9f7ac0e15bdbe0ae5) @@ -479,10 +479,11 @@ CloseForData = (view, dataToCloseFor) => ReferenceEquals(view.AssessmentSection, dataToCloseFor), CreateInstance = context => new AssemblyResultPerSectionMapView(context.WrappedData) }; - + yield return new RiskeerViewInfo(() => Gui) { GetViewName = (view, context) => RiskeerCommonFormsResources.AssemblyGroups_DisplayName, + CloseForData = (view, dataToCloseFor) => ReferenceEquals(view.AssessmentSection, dataToCloseFor), CreateInstance = context => new AssemblyGroupsView(context.WrappedData) }; } Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/AssemblyGroupsViewInfoTest.cs =================================================================== diff -u -rc8ac3de5e56e79827907f09f464537172616a61e -r649c00f8c201652de091dcd9f7ac0e15bdbe0ae5 --- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/AssemblyGroupsViewInfoTest.cs (.../AssemblyGroupsViewInfoTest.cs) (revision c8ac3de5e56e79827907f09f464537172616a61e) +++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/ViewInfos/AssemblyGroupsViewInfoTest.cs (.../AssemblyGroupsViewInfoTest.cs) (revision 649c00f8c201652de091dcd9f7ac0e15bdbe0ae5) @@ -69,6 +69,41 @@ } [Test] + public void CloseForData_ViewCorrespondingToRemovedAssessmentSection_ReturnsTrue() + { + // Setup + var random = new Random(21); + var assessmentSection = new AssessmentSection(random.NextEnumValue()); + + using (var view = new AssemblyGroupsView(assessmentSection)) + { + // Call + bool closeForData = info.CloseForData(view, assessmentSection); + + // Assert + Assert.IsTrue(closeForData); + } + } + + [Test] + public void CloseForData_ViewNotCorrespondingToRemovedAssessmentSection_ReturnsFalse() + { + // Setup + var random = new Random(21); + var assessmentSection1 = new AssessmentSection(random.NextEnumValue()); + var assessmentSection2 = new AssessmentSection(random.NextEnumValue()); + + using (var view = new AssemblyGroupsView(assessmentSection1)) + { + // Call + bool closeForData = info.CloseForData(view, assessmentSection2); + + // Assert + Assert.IsFalse(closeForData); + } + } + + [Test] public void CreateInstance_WithContext_SetsExpectedViewProperties() { // Setup