Index: Riskeer/Piping/src/Riskeer.Piping.Forms/Views/ProbabilisticFaultTreePipingOutputView.cs =================================================================== diff -u --- Riskeer/Piping/src/Riskeer.Piping.Forms/Views/ProbabilisticFaultTreePipingOutputView.cs (revision 0) +++ Riskeer/Piping/src/Riskeer.Piping.Forms/Views/ProbabilisticFaultTreePipingOutputView.cs (revision c4b0663c2ee423e2fdf08b374299c5f6326c0dbb) @@ -0,0 +1,49 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System; +using Riskeer.Common.Data.IllustrationPoints; +using Riskeer.Common.Forms.Views; +using Riskeer.Piping.Data.Probabilistic; + +namespace Riskeer.Piping.Forms.Views +{ + /// + /// Override of for making output views for + /// uniquely identifiable (when it comes + /// to opening/closing views). + /// + public class ProbabilisticFaultTreePipingOutputView : GeneralResultFaultTreeIllustrationPointView + { + /// + /// Creates a new instance of . + /// + /// The calculation to show the illustration points for. + /// A for obtaining the illustration point + /// data ( with objects) + /// that must be presented. + /// Thrown when any parameter is null. + public ProbabilisticFaultTreePipingOutputView( + ProbabilisticPipingCalculationScenario calculation, + Func> getGeneralResultFunc) + : base(calculation, getGeneralResultFunc) {} + } +} \ No newline at end of file Fisheye: Tag c4b0663c2ee423e2fdf08b374299c5f6326c0dbb refers to a dead (removed) revision in file `Riskeer/Piping/src/Riskeer.Piping.Forms/Views/ProbabilisticFaultTreePipingProfileSpecificOutputView.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c4b0663c2ee423e2fdf08b374299c5f6326c0dbb refers to a dead (removed) revision in file `Riskeer/Piping/src/Riskeer.Piping.Forms/Views/ProbabilisticFaultTreePipingSectionSpecificOutputView.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs =================================================================== diff -u -r490dd2a8094c31d61e77723ef8f9cbe9e9305d63 -rc4b0663c2ee423e2fdf08b374299c5f6326c0dbb --- Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 490dd2a8094c31d61e77723ef8f9cbe9e9305d63) +++ Riskeer/Piping/src/Riskeer.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision c4b0663c2ee423e2fdf08b374299c5f6326c0dbb) @@ -346,7 +346,7 @@ } }; - yield return new ViewInfo + yield return new ViewInfo { GetViewData = context => context.WrappedData, GetViewName = (view, context) => PipingFormsResources.ProbabilisticSectionSpecificOutput_DisplayName, @@ -355,7 +355,7 @@ AdditionalDataCheck = context => !context.WrappedData.HasOutput || context.WrappedData.Output.SectionSpecificOutput is PartialProbabilisticFaultTreePipingOutput, CreateInstance = context => { - return new ProbabilisticFaultTreePipingSectionSpecificOutputView( + return new ProbabilisticFaultTreePipingOutputView( context.WrappedData, () => ((PartialProbabilisticFaultTreePipingOutput) context.WrappedData.Output?.SectionSpecificOutput)?.GeneralResult); } Index: Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/ProbabilisticFaultTreePipingOutputViewTest.cs =================================================================== diff -u --- Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/ProbabilisticFaultTreePipingOutputViewTest.cs (revision 0) +++ Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/ProbabilisticFaultTreePipingOutputViewTest.cs (revision c4b0663c2ee423e2fdf08b374299c5f6326c0dbb) @@ -0,0 +1,47 @@ +// Copyright (C) Stichting Deltares 2021. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Threading; +using NUnit.Framework; +using Riskeer.Common.Data.TestUtil.IllustrationPoints; +using Riskeer.Common.Forms.Views; +using Riskeer.Piping.Data.Probabilistic; +using Riskeer.Piping.Forms.Views; + +namespace Riskeer.Piping.Forms.Test.Views +{ + [TestFixture] + [Apartment(ApartmentState.STA)] + public class ProbabilisticFaultTreePipingOutputViewTest + { + [Test] + public void Constructor_ExpectedValues() + { + // Call + var view = new ProbabilisticFaultTreePipingOutputView( + new ProbabilisticPipingCalculationScenario(), + () => new TestGeneralResultFaultTreeIllustrationPoint()); + + // Assert + Assert.IsInstanceOf(view); + } + } +} \ No newline at end of file Fisheye: Tag c4b0663c2ee423e2fdf08b374299c5f6326c0dbb refers to a dead (removed) revision in file `Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/ProbabilisticFaultTreePipingProfileSpecificOutputViewTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag c4b0663c2ee423e2fdf08b374299c5f6326c0dbb refers to a dead (removed) revision in file `Riskeer/Piping/test/Riskeer.Piping.Forms.Test/Views/ProbabilisticFaultTreePipingSectionSpecificOutputViewTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/PipingPluginTest.cs =================================================================== diff -u -r490dd2a8094c31d61e77723ef8f9cbe9e9305d63 -rc4b0663c2ee423e2fdf08b374299c5f6326c0dbb --- Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/PipingPluginTest.cs (.../PipingPluginTest.cs) (revision 490dd2a8094c31d61e77723ef8f9cbe9e9305d63) +++ Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/PipingPluginTest.cs (.../PipingPluginTest.cs) (revision c4b0663c2ee423e2fdf08b374299c5f6326c0dbb) @@ -252,7 +252,7 @@ viewInfos, typeof(ProbabilisticPipingSectionSpecificOutputContext), typeof(ProbabilisticPipingCalculationScenario), - typeof(ProbabilisticFaultTreePipingSectionSpecificOutputView)); + typeof(ProbabilisticFaultTreePipingOutputView)); PluginTestHelper.AssertViewInfoDefined( viewInfos, Index: Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/ViewInfos/ProbabilisticFaultTreePipingSectionSpecificOutputViewInfoTest.cs =================================================================== diff -u -r02952ce44b631f296213e2c133a0d4c72fc574b1 -rc4b0663c2ee423e2fdf08b374299c5f6326c0dbb --- Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/ViewInfos/ProbabilisticFaultTreePipingSectionSpecificOutputViewInfoTest.cs (.../ProbabilisticFaultTreePipingSectionSpecificOutputViewInfoTest.cs) (revision 02952ce44b631f296213e2c133a0d4c72fc574b1) +++ Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/ViewInfos/ProbabilisticFaultTreePipingSectionSpecificOutputViewInfoTest.cs (.../ProbabilisticFaultTreePipingSectionSpecificOutputViewInfoTest.cs) (revision c4b0663c2ee423e2fdf08b374299c5f6326c0dbb) @@ -54,7 +54,7 @@ public void SetUp() { plugin = new PipingPlugin(); - info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(ProbabilisticFaultTreePipingSectionSpecificOutputView)); + info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(ProbabilisticFaultTreePipingOutputView)); } [TearDown] @@ -158,7 +158,7 @@ IView view = info.CreateInstance(context); // Assert - Assert.IsInstanceOf(view); + Assert.IsInstanceOf(view); } [TestFixture] @@ -169,14 +169,14 @@ using (var plugin = new PipingPlugin()) { return plugin.GetViewInfos() - .First(tni => tni.ViewType == typeof(ProbabilisticFaultTreePipingSectionSpecificOutputView)) + .First(tni => tni.ViewType == typeof(ProbabilisticFaultTreePipingOutputView)) .CloseForData(view, o); } } protected override IView GetView(ICalculation data) { - return new ProbabilisticFaultTreePipingSectionSpecificOutputView( + return new ProbabilisticFaultTreePipingOutputView( (ProbabilisticPipingCalculationScenario) data, () => new TestGeneralResultFaultTreeIllustrationPoint()); } Index: Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/ViewInfos/ProbabilisticSubMechanismPipingSectionSpecificOutputViewInfoTest.cs =================================================================== diff -u -r490dd2a8094c31d61e77723ef8f9cbe9e9305d63 -rc4b0663c2ee423e2fdf08b374299c5f6326c0dbb --- Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/ViewInfos/ProbabilisticSubMechanismPipingSectionSpecificOutputViewInfoTest.cs (.../ProbabilisticSubMechanismPipingSectionSpecificOutputViewInfoTest.cs) (revision 490dd2a8094c31d61e77723ef8f9cbe9e9305d63) +++ Riskeer/Piping/test/Riskeer.Piping.Plugin.Test/ViewInfos/ProbabilisticSubMechanismPipingSectionSpecificOutputViewInfoTest.cs (.../ProbabilisticSubMechanismPipingSectionSpecificOutputViewInfoTest.cs) (revision c4b0663c2ee423e2fdf08b374299c5f6326c0dbb) @@ -169,14 +169,14 @@ using (var plugin = new PipingPlugin()) { return plugin.GetViewInfos() - .First(tni => tni.ViewType == typeof(ProbabilisticFaultTreePipingSectionSpecificOutputView)) + .First(tni => tni.ViewType == typeof(ProbabilisticFaultTreePipingOutputView)) .CloseForData(view, o); } } protected override IView GetView(ICalculation data) { - return new ProbabilisticFaultTreePipingSectionSpecificOutputView( + return new ProbabilisticFaultTreePipingOutputView( (ProbabilisticPipingCalculationScenario) data, () => new TestGeneralResultFaultTreeIllustrationPoint()); }