Fisheye: Tag d943445f75d5e37e2285136f19913fbf90e525f4 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/Calculation/EmptyProbabilisticOutput.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityOutput.cs =================================================================== diff -u --- Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityOutput.cs (revision 0) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityOutput.cs (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -0,0 +1,31 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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 Ringtoets.Common.Data.Calculation; + +namespace Ringtoets.Common.Data.Probability +{ + /// + /// This class represents a placeholder of a for a + /// that has not been calculated yet. + /// + public class EmptyProbabilityOutput {} +} \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -43,7 +43,7 @@ - + Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs =================================================================== diff -u -r4aa6d896646fee50b7bc6fadd9c2251b4fdd4f2e -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs (.../RingtoetsTreeNodeInfoFactory.cs) (revision 4aa6d896646fee50b7bc6fadd9c2251b4fdd4f2e) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs (.../RingtoetsTreeNodeInfoFactory.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -26,6 +26,7 @@ using Core.Common.Controls.TreeView; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.Properties; using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; @@ -142,14 +143,14 @@ } /// - /// Creates a object for an empty probabilistic output. + /// Creates a object for an empty probability output. /// /// The function for obtaining the context menu strip. /// A object. - public static TreeNodeInfo CreateEmptyProbabilisticOutputTreeNodeInfo( - Func contextMenuStrip) + public static TreeNodeInfo CreateEmptyProbabilityOutputTreeNodeInfo( + Func contextMenuStrip) { - return new TreeNodeInfo + return new TreeNodeInfo { Text = emptyOutput => Resources.CalculationOutput_DisplayName, Image = emptyOutput => Resources.GeneralOutputIcon, Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsTreeNodeInfoFactoryTest.cs =================================================================== diff -u -r5b8f476716cb75977616203318fa250f608fe7a5 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsTreeNodeInfoFactoryTest.cs (.../RingtoetsTreeNodeInfoFactoryTest.cs) (revision 5b8f476716cb75977616203318fa250f608fe7a5) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsTreeNodeInfoFactoryTest.cs (.../RingtoetsTreeNodeInfoFactoryTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -31,6 +31,7 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; +using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Common.Forms.TreeNodeInfos; using BaseResources = Core.Common.Base.Properties.Resources; @@ -1065,19 +1066,19 @@ # endregion - #region EmptyProbabilisticOutputTreeNodeInfo + #region EmptyProbabilityOutputTreeNodeInfo [Test] - public void CreateEmptyProbabilisticOutputTreeNodeInfo_Always_ExpectedPropertiesSet() + public void CreateEmptyProbabilityOutputTreeNodeInfo_Always_ExpectedPropertiesSet() { // Setup - Func contextMenuStrip = (context, parent, treeViewControl) => new ContextMenuStrip(); + Func contextMenuStrip = (context, parent, treeViewControl) => new ContextMenuStrip(); // Call - var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilisticOutputTreeNodeInfo(contextMenuStrip); + var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(contextMenuStrip); // Assert - Assert.AreEqual(typeof(EmptyProbabilisticOutput), treeNodeInfo.TagType); + Assert.AreEqual(typeof(EmptyProbabilityOutput), treeNodeInfo.TagType); Assert.IsNotNull(treeNodeInfo.ContextMenuStrip); Assert.IsNotNull(treeNodeInfo.ForeColor); Assert.IsNotNull(treeNodeInfo.Image); @@ -1098,10 +1099,10 @@ } [Test] - public void TextOfCreateEmptyProbabilisticOutputTreeNodeInfo_Always_ReturnsFromResource() + public void TextOfCreateEmptyProbabilityOutputTreeNodeInfo_Always_ReturnsFromResource() { // Setup - var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilisticOutputTreeNodeInfo(null); + var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(null); // Call var text = treeNodeInfo.Text(null); @@ -1111,10 +1112,10 @@ } [Test] - public void ImageOfCreateEmptyProbabilisticOutputTreeNodeInfo_Always_ReturnsGeneralOutputIcon() + public void ImageOfCreateEmptyProbabilityOutputTreeNodeInfo_Always_ReturnsGeneralOutputIcon() { // Setup - var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilisticOutputTreeNodeInfo(null); + var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(null); // Call var image = treeNodeInfo.Image(null); @@ -1124,10 +1125,10 @@ } [Test] - public void ForeColorOfCreateEmptyProbabilisticOutputTreeNodeInfos_Always_ReturnsGrayText() + public void ForeColorOfCreateEmptyProbabilityOutputTreeNodeInfos_Always_ReturnsGrayText() { // Setup - var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilisticOutputTreeNodeInfo(null); + var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(null); // Call var textColor = treeNodeInfo.ForeColor(null); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -134,8 +134,8 @@ .Build() }; - yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilisticOutputTreeNodeInfo( - EmptyProbabilisticOutputContextMenuStrip); + yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo( + EmptyProbabilityOutputContextMenuStrip); } private static ExceedanceProbabilityCalculationActivity CreateHydraRingExceedenceProbabilityCalculationActivity(FailureMechanismSection failureMechanismSection, @@ -275,9 +275,9 @@ #endregion - #region EmptyProbabilisticOutput TreeNodeInfo + #region EmptyProbabilityOutput TreeNodeInfo - private ContextMenuStrip EmptyProbabilisticOutputContextMenuStrip(EmptyProbabilisticOutput output, object parentData, TreeViewControl treeViewControl) + private ContextMenuStrip EmptyProbabilityOutputContextMenuStrip(EmptyProbabilityOutput output, object parentData, TreeViewControl treeViewControl) { var builder = new RingtoetsContextMenuBuilder(Gui.Get(output, treeViewControl)); return builder.AddExportItem() @@ -492,7 +492,7 @@ } else { - childNodes.Add(new EmptyProbabilisticOutput()); + childNodes.Add(new EmptyProbabilityOutput()); } return childNodes.ToArray(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -83,7 +83,7 @@ - + Fisheye: Tag d943445f75d5e37e2285136f19913fbf90e525f4 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilisticOutputTreeNodeInfoTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -0,0 +1,75 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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.Linq; +using Core.Common.Controls.TreeView; +using Core.Common.Gui; +using Core.Common.Gui.ContextMenu; +using NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.Probability; +using Ringtoets.GrassCoverErosionInwards.Plugin; +using GrassCoverErosionInwardsFormsResources = Ringtoets.GrassCoverErosionInwards.Forms.Properties.Resources; +using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; + +namespace Ringtoets.GrassCoverErosionInwards.Forms.Test.TreeNodeInfos +{ + [TestFixture] + public class EmptyProbabilityOutputTreeNodeInfoTest + { + private MockRepository mocksRepository; + private GrassCoverErosionInwardsGuiPlugin plugin; + private TreeNodeInfo info; + + [SetUp] + public void SetUp() + { + mocksRepository = new MockRepository(); + plugin = new GrassCoverErosionInwardsGuiPlugin(); + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(EmptyProbabilityOutput)); + } + + [Test] + public void ContextMenuStrip_Always_CallsContextMenuBuilderMethods() + { + // Setup + var guiMock = mocksRepository.StrictMock(); + var menuBuilderMock = mocksRepository.StrictMock(); + var treeViewControlMock = mocksRepository.StrictMock(); + + menuBuilderMock.Expect(mb => mb.AddExportItem()).Return(menuBuilderMock); + menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock); + menuBuilderMock.Expect(mb => mb.AddPropertiesItem()).Return(menuBuilderMock); + menuBuilderMock.Expect(mb => mb.Build()).Return(null); + + guiMock.Expect(cmp => cmp.Get(null, treeViewControlMock)).Return(menuBuilderMock); + mocksRepository.ReplayAll(); + + plugin.Gui = guiMock; + + // Call + info.ContextMenuStrip(null, null, treeViewControlMock); + + // Assert + mocksRepository.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -126,7 +126,7 @@ Assert.IsNotNull(grassCoverErosionInwardsInputContext); Assert.AreSame(calculationContext.WrappedData.InputParameters, grassCoverErosionInwardsInputContext.WrappedData); - var emptyOutput = children[2] as EmptyProbabilisticOutput; + var emptyOutput = children[2] as EmptyProbabilityOutput; Assert.IsNotNull(emptyOutput); mocks.VerifyAll(); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -27,7 +27,6 @@ using Core.Common.Gui.Plugin; using NUnit.Framework; using Rhino.Mocks; -using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.GrassCoverErosionInwards.Data; @@ -120,7 +119,7 @@ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionInwardsCalculationContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(GrassCoverErosionInwardsInputContext))); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilisticOutput))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilityOutput))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityOutput))); } mocks.VerifyAll(); Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresCalculation.cs (.../HeightStructuresCalculation.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -36,8 +36,9 @@ /// /// Creates a new instance of . /// - /// General height structures calculation input parameters that apply to each calculation. - /// General norm probabilistic parameters that apply to each + /// General height structures calculation input parameters + /// that apply to each calculation. + /// General probabilistic assessment parameters that apply to each /// calculation. /// Thrown when /// is null. Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -121,8 +121,8 @@ .Build() }; - yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilisticOutputTreeNodeInfo( - EmptyProbabilisticOutputContextMenuStrip); + yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo( + EmptyProbabilityOutputContextMenuStrip); yield return new TreeNodeInfo> { @@ -212,9 +212,9 @@ } } - #region EmptyProbabilisticOutput TreeNodeInfo + #region EmptyProbabilityOutput TreeNodeInfo - private ContextMenuStrip EmptyProbabilisticOutputContextMenuStrip(EmptyProbabilisticOutput output, object parentData, TreeViewControl treeViewControl) + private ContextMenuStrip EmptyProbabilityOutputContextMenuStrip(EmptyProbabilityOutput output, object parentData, TreeViewControl treeViewControl) { var builder = new RingtoetsContextMenuBuilder(Gui.Get(output, treeViewControl)); return builder.AddExportItem() @@ -452,7 +452,7 @@ } else { - childNodes.Add(new EmptyProbabilisticOutput()); + childNodes.Add(new EmptyProbabilityOutput()); } return childNodes.ToArray(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj =================================================================== diff -u -r5ad1e5f20a1f874a2a5592a259c4ca7c812aebeb -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision 5ad1e5f20a1f874a2a5592a259c4ca7c812aebeb) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -65,7 +65,7 @@ - + Fisheye: Tag d943445f75d5e37e2285136f19913fbf90e525f4 refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilisticOutputTreeNodeInfoTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs =================================================================== diff -u --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs (revision 0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -0,0 +1,74 @@ +// Copyright (C) Stichting Deltares 2016. All rights reserved. +// +// This file is part of Ringtoets. +// +// Ringtoets 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.Linq; +using Core.Common.Controls.TreeView; +using Core.Common.Gui; +using Core.Common.Gui.ContextMenu; +using NUnit.Framework; +using Rhino.Mocks; +using Ringtoets.Common.Data.Probability; +using Ringtoets.HeightStructures.Plugin; +using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; + +namespace Ringtoets.HeightStructures.Forms.Test.TreeNodeInfos +{ + [TestFixture] + public class EmptyProbabilityOutputTreeNodeInfoTest + { + private MockRepository mocksRepository; + private HeightStructuresGuiPlugin plugin; + private TreeNodeInfo info; + + [SetUp] + public void SetUp() + { + mocksRepository = new MockRepository(); + plugin = new HeightStructuresGuiPlugin(); + info = plugin.GetTreeNodeInfos().First(tni => tni.TagType == typeof(EmptyProbabilityOutput)); + } + + [Test] + public void ContextMenuStrip_Always_CallsContextMenuBuilderMethods() + { + // Setup + var guiMock = mocksRepository.StrictMock(); + var menuBuilderMock = mocksRepository.StrictMock(); + var treeViewControlMock = mocksRepository.StrictMock(); + + menuBuilderMock.Expect(mb => mb.AddExportItem()).Return(menuBuilderMock); + menuBuilderMock.Expect(mb => mb.AddSeparator()).Return(menuBuilderMock); + menuBuilderMock.Expect(mb => mb.AddPropertiesItem()).Return(menuBuilderMock); + menuBuilderMock.Expect(mb => mb.Build()).Return(null); + + guiMock.Expect(cmp => cmp.Get(null, treeViewControlMock)).Return(menuBuilderMock); + mocksRepository.ReplayAll(); + + plugin.Gui = guiMock; + + // Call + info.ContextMenuStrip(null, null, treeViewControlMock); + + // Assert + mocksRepository.VerifyAll(); + } + } +} \ No newline at end of file Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -126,7 +126,7 @@ Assert.IsNotNull(heightStructuresInputContext); Assert.AreSame(calculationContext.WrappedData.InputParameters, heightStructuresInputContext.WrappedData); - var emptyOutput = children[2] as EmptyProbabilisticOutput; + var emptyOutput = children[2] as EmptyProbabilityOutput; Assert.IsNotNull(emptyOutput); mocks.VerifyAll(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs =================================================================== diff -u -ra08078c06de7ad327ed2b518276288e4d4f0e3a8 -rd943445f75d5e37e2285136f19913fbf90e525f4 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs (.../HeightStructuresGuiPluginTest.cs) (revision a08078c06de7ad327ed2b518276288e4d4f0e3a8) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs (.../HeightStructuresGuiPluginTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4) @@ -27,7 +27,6 @@ using Core.Common.Gui.Plugin; using NUnit.Framework; using Rhino.Mocks; -using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probability; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.HeightStructures.Data; @@ -109,7 +108,7 @@ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HeightStructuresCalculationContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(HeightStructuresInputContext))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityOutput))); - Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilisticOutput))); + Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilityOutput))); Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext))); }