Index: Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityAssessmentOutput.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityAssessmentOutput.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityAssessmentOutput.cs (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -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 EmptyProbabilityAssessmentOutput {}
+}
\ No newline at end of file
Fisheye: Tag cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/Probability/EmptyProbabilityOutput.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -43,7 +43,7 @@
-
+
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs (.../RingtoetsTreeNodeInfoFactory.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/TreeNodeInfos/RingtoetsTreeNodeInfoFactory.cs (.../RingtoetsTreeNodeInfoFactory.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -143,14 +143,14 @@
}
///
- /// Creates a object for an empty probability output.
+ /// Creates a object for an empty probability assessment output.
///
/// The function for obtaining the context menu strip.
/// A object.
- public static TreeNodeInfo CreateEmptyProbabilityOutputTreeNodeInfo(
- Func contextMenuStrip)
+ public static TreeNodeInfo CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(
+ 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 -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsTreeNodeInfoFactoryTest.cs (.../RingtoetsTreeNodeInfoFactoryTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TreeNodeInfos/RingtoetsTreeNodeInfoFactoryTest.cs (.../RingtoetsTreeNodeInfoFactoryTest.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -1066,19 +1066,19 @@
# endregion
- #region EmptyProbabilityOutputTreeNodeInfo
+ #region EmptyProbabilityAssessmentOutputTreeNodeInfo
[Test]
- public void CreateEmptyProbabilityOutputTreeNodeInfo_Always_ExpectedPropertiesSet()
+ public void CreateEmptyProbabilityAssessmentOutputTreeNodeInfo_Always_ExpectedPropertiesSet()
{
// Setup
- Func contextMenuStrip = (context, parent, treeViewControl) => new ContextMenuStrip();
+ Func contextMenuStrip = (context, parent, treeViewControl) => new ContextMenuStrip();
// Call
- var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(contextMenuStrip);
+ var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(contextMenuStrip);
// Assert
- Assert.AreEqual(typeof(EmptyProbabilityOutput), treeNodeInfo.TagType);
+ Assert.AreEqual(typeof(EmptyProbabilityAssessmentOutput), treeNodeInfo.TagType);
Assert.IsNotNull(treeNodeInfo.ContextMenuStrip);
Assert.IsNotNull(treeNodeInfo.ForeColor);
Assert.IsNotNull(treeNodeInfo.Image);
@@ -1099,10 +1099,10 @@
}
[Test]
- public void TextOfCreateEmptyProbabilityOutputTreeNodeInfo_Always_ReturnsFromResource()
+ public void TextOfCreateEmptyProbabilityAssessmentOutputTreeNodeInfo_Always_ReturnsFromResource()
{
// Setup
- var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(null);
+ var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(null);
// Call
var text = treeNodeInfo.Text(null);
@@ -1112,10 +1112,10 @@
}
[Test]
- public void ImageOfCreateEmptyProbabilityOutputTreeNodeInfo_Always_ReturnsGeneralOutputIcon()
+ public void ImageOfCreateEmptyProbabilityAssessmentOutputTreeNodeInfo_Always_ReturnsGeneralOutputIcon()
{
// Setup
- var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(null);
+ var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(null);
// Call
var image = treeNodeInfo.Image(null);
@@ -1125,10 +1125,10 @@
}
[Test]
- public void ForeColorOfCreateEmptyProbabilityOutputTreeNodeInfos_Always_ReturnsGrayText()
+ public void ForeColorOfCreateEmptyProbabilityAssessmentOutputTreeNodeInfos_Always_ReturnsGrayText()
{
// Setup
- var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(null);
+ var treeNodeInfo = RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(null);
// Call
var textColor = treeNodeInfo.ForeColor(null);
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Plugin/GrassCoverErosionInwardsGuiPlugin.cs (.../GrassCoverErosionInwardsGuiPlugin.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -134,8 +134,8 @@
.Build()
};
- yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(
- EmptyProbabilityOutputContextMenuStrip);
+ yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(
+ EmptyProbabilityAssessmentOutputContextMenuStrip);
}
private static ExceedanceProbabilityCalculationActivity CreateHydraRingExceedenceProbabilityCalculationActivity(FailureMechanismSection failureMechanismSection,
@@ -275,9 +275,9 @@
#endregion
- #region EmptyProbabilityOutput TreeNodeInfo
+ #region EmptyProbabilityAssessmentOutput TreeNodeInfo
- private ContextMenuStrip EmptyProbabilityOutputContextMenuStrip(EmptyProbabilityOutput output, object parentData, TreeViewControl treeViewControl)
+ private ContextMenuStrip EmptyProbabilityAssessmentOutputContextMenuStrip(EmptyProbabilityAssessmentOutput output, object parentData, TreeViewControl treeViewControl)
{
var builder = new RingtoetsContextMenuBuilder(Gui.Get(output, treeViewControl));
return builder.AddExportItem()
@@ -492,7 +492,7 @@
}
else
{
- childNodes.Add(new EmptyProbabilityOutput());
+ childNodes.Add(new EmptyProbabilityAssessmentOutput());
}
return childNodes.ToArray();
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj (.../Ringtoets.GrassCoverErosionInwards.Forms.Test.csproj) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -83,7 +83,7 @@
-
+
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityAssessmentOutputTreeNodeInfoTest.cs
===================================================================
diff -u
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityAssessmentOutputTreeNodeInfoTest.cs (revision 0)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityAssessmentOutputTreeNodeInfoTest.cs (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -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 EmptyProbabilityAssessmentOutputTreeNodeInfoTest
+ {
+ 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(EmptyProbabilityAssessmentOutput));
+ }
+
+ [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
Fisheye: Tag cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37 refers to a dead (removed) revision in file `Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/TreeNodeInfos/GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs (.../GrassCoverErosionInwardsCalculationContextTreeNodeInfoTest.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -126,7 +126,7 @@
Assert.IsNotNull(grassCoverErosionInwardsInputContext);
Assert.AreSame(calculationContext.WrappedData.InputParameters, grassCoverErosionInwardsInputContext.WrappedData);
- var emptyOutput = children[2] as EmptyProbabilityOutput;
+ var emptyOutput = children[2] as EmptyProbabilityAssessmentOutput;
Assert.IsNotNull(emptyOutput);
mocks.VerifyAll();
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Plugin.Test/GrassCoverErosionInwardsGuiPluginTest.cs (.../GrassCoverErosionInwardsGuiPluginTest.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -119,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(EmptyProbabilityOutput)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilityAssessmentOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(ProbabilityOutput)));
}
mocks.VerifyAll();
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresGuiPlugin.cs (.../HeightStructuresGuiPlugin.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -121,8 +121,8 @@
.Build()
};
- yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityOutputTreeNodeInfo(
- EmptyProbabilityOutputContextMenuStrip);
+ yield return RingtoetsTreeNodeInfoFactory.CreateEmptyProbabilityAssessmentOutputTreeNodeInfo(
+ EmptyProbabilityAssessmentOutputContextMenuStrip);
yield return new TreeNodeInfo>
{
@@ -212,9 +212,9 @@
}
}
- #region EmptyProbabilityOutput TreeNodeInfo
+ #region EmptyProbabilityAssessmentOutput TreeNodeInfo
- private ContextMenuStrip EmptyProbabilityOutputContextMenuStrip(EmptyProbabilityOutput output, object parentData, TreeViewControl treeViewControl)
+ private ContextMenuStrip EmptyProbabilityAssessmentOutputContextMenuStrip(EmptyProbabilityAssessmentOutput output, object parentData, TreeViewControl treeViewControl)
{
var builder = new RingtoetsContextMenuBuilder(Gui.Get(output, treeViewControl));
return builder.AddExportItem()
@@ -452,7 +452,7 @@
}
else
{
- childNodes.Add(new EmptyProbabilityOutput());
+ childNodes.Add(new EmptyProbabilityAssessmentOutput());
}
return childNodes.ToArray();
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Ringtoets.HeightStructures.Forms.Test.csproj (.../Ringtoets.HeightStructures.Forms.Test.csproj) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -65,7 +65,7 @@
-
+
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityAssessmentOutputTreeNodeInfoTest.cs
===================================================================
diff -u
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityAssessmentOutputTreeNodeInfoTest.cs (revision 0)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityAssessmentOutputTreeNodeInfoTest.cs (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -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 EmptyProbabilityAssessmentOutputTreeNodeInfoTest
+ {
+ 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(EmptyProbabilityAssessmentOutput));
+ }
+
+ [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
Fisheye: Tag cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37 refers to a dead (removed) revision in file `Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/EmptyProbabilityOutputTreeNodeInfoTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructuresCalculationContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationContextTreeNodeInfoTest.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -126,7 +126,7 @@
Assert.IsNotNull(heightStructuresInputContext);
Assert.AreSame(calculationContext.WrappedData.InputParameters, heightStructuresInputContext.WrappedData);
- var emptyOutput = children[2] as EmptyProbabilityOutput;
+ var emptyOutput = children[2] as EmptyProbabilityAssessmentOutput;
Assert.IsNotNull(emptyOutput);
mocks.VerifyAll();
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs
===================================================================
diff -u -rd943445f75d5e37e2285136f19913fbf90e525f4 -rcfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs (.../HeightStructuresGuiPluginTest.cs) (revision d943445f75d5e37e2285136f19913fbf90e525f4)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/HeightStructuresGuiPluginTest.cs (.../HeightStructuresGuiPluginTest.cs) (revision cfbc63bdf527a3b6b51c6bfb5442eecd8c7a9c37)
@@ -108,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(EmptyProbabilityOutput)));
+ Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(EmptyProbabilityAssessmentOutput)));
Assert.IsTrue(treeNodeInfos.Any(tni => tni.TagType == typeof(FailureMechanismSectionResultContext)));
}