Index: Core/Common/src/Core.Common.Gui/ActiveViewChangeEventArgs.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/ActiveViewChangeEventArgs.cs (.../ActiveViewChangeEventArgs.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/ActiveViewChangeEventArgs.cs (.../ActiveViewChangeEventArgs.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -20,7 +20,6 @@
// All rights preserved.
using System;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
namespace Core.Common.Gui
Index: Core/Common/src/Core.Common.Gui/Commands/MainWindowCommands.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Commands/MainWindowCommands.cs (.../MainWindowCommands.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Commands/MainWindowCommands.cs (.../MainWindowCommands.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -20,7 +20,6 @@
// All rights preserved.
using System.Windows.Input;
-using Core.Common.Gui.Properties;
namespace Core.Common.Gui.Commands
{
Index: Core/Common/src/Core.Common.Gui/Forms/MessageWindow/IMessageWindow.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/MessageWindow/IMessageWindow.cs (.../IMessageWindow.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/MessageWindow/IMessageWindow.cs (.../IMessageWindow.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -20,7 +20,6 @@
// All rights preserved.
using System;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
using log4net.Core;
Index: Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs (.../MessageWindow.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs (.../MessageWindow.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -23,9 +23,7 @@
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel;
-using System.Drawing;
using System.Windows.Forms;
-using Core.Common.Controls;
using Core.Common.Gui.Properties;
using log4net.Core;
@@ -81,6 +79,29 @@
messagesDataGridView.RowsAdded += messagesDataGridView_RowsAdded;
}
+ #region IView Members
+
+ public object Data
+ {
+ get
+ {
+ return messageWindowData;
+ }
+ set {}
+ }
+
+ #endregion
+
+ ///
+ /// Raises the event.
+ ///
+ /// A that contains the event data.
+ protected override void OnPaint(PaintEventArgs e)
+ {
+ base.OnPaint(e);
+ PopulateMessages();
+ }
+
private void PopulateMessages()
{
if (newMessages.IsEmpty)
@@ -115,16 +136,6 @@
}
}
- ///
- /// Raises the event.
- ///
- /// A that contains the event data.
- protected override void OnPaint(PaintEventArgs e)
- {
- base.OnPaint(e);
- PopulateMessages();
- }
-
private void messagesDataGridView_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
{
if (filtering)
@@ -273,19 +284,6 @@
public string Message { get; set; }
}
- #region IView Members
-
- public object Data
- {
- get
- {
- return messageWindowData;
- }
- set {}
- }
-
- #endregion
-
#region IMessageWindow Members
///
Index: Core/Common/src/Core.Common.Gui/Forms/RichTextView.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/RichTextView.cs (.../RichTextView.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/RichTextView.cs (.../RichTextView.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -21,7 +21,6 @@
using System.IO;
using System.Windows.Forms;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
namespace Core.Common.Gui.Forms
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/DockTabClosingEventArgs.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/DockTabClosingEventArgs.cs (.../DockTabClosingEventArgs.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/DockTabClosingEventArgs.cs (.../DockTabClosingEventArgs.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -20,7 +20,6 @@
// All rights preserved.
using System;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
namespace Core.Common.Gui.Forms.ViewManager
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/IDockingManager.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/IDockingManager.cs (.../IDockingManager.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/IDockingManager.cs (.../IDockingManager.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -23,7 +23,6 @@
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
namespace Core.Common.Gui.Forms.ViewManager
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs (.../ViewResolver.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewResolver.cs (.../ViewResolver.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -23,7 +23,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
using Core.Common.Gui.Plugin;
using Core.Common.Gui.Properties;
Index: Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionMouseController.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionMouseController.cs (.../ViewSelectionMouseController.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/Forms/ViewManager/ViewSelectionMouseController.cs (.../ViewSelectionMouseController.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -21,7 +21,6 @@
using System;
using System.Windows.Forms;
-using Core.Common.Controls;
using Core.Common.Controls.Views;
using Core.Common.Gui.Properties;
Index: Core/Common/src/Core.Common.Gui/GuiPlugin.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Core/Common/src/Core.Common.Gui/GuiPlugin.cs (.../GuiPlugin.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Core/Common/src/Core.Common.Gui/GuiPlugin.cs (.../GuiPlugin.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -22,7 +22,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using Core.Common.Controls;
using Core.Common.Controls.TreeView;
using Core.Common.Gui.Forms;
using Core.Common.Gui.Plugin;
@@ -40,22 +39,6 @@
public virtual IGui Gui { get; set; }
///
- /// Activates the gui plugin.
- ///
- public virtual void Activate()
- {
-
- }
-
- ///
- /// Deactivates the gui plugin.
- ///
- public virtual void Deactivate()
- {
-
- }
-
- ///
/// Ribbon command handler (adding tabs, groups, buttons, etc.) which can be provided by the gui plugin.
///
public virtual IRibbonCommandHandler RibbonCommandHandler
@@ -67,6 +50,16 @@
}
///
+ /// Activates the gui plugin.
+ ///
+ public virtual void Activate() {}
+
+ ///
+ /// Deactivates the gui plugin.
+ ///
+ public virtual void Deactivate() {}
+
+ ///
/// Property info objects which can be provided by the gui plugin.
///
public virtual IEnumerable GetPropertyInfos()
@@ -91,14 +84,14 @@
yield break;
}
- public virtual void Dispose()
+ public virtual IEnumerable
Dike,
+
///
/// Type value representing instances.
///
Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayer2D.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayer2D.cs (.../SoilLayer2D.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayer2D.cs (.../SoilLayer2D.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -23,7 +23,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Linq.Expressions;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Data.Calculation;
using Ringtoets.Piping.IO.Properties;
@@ -82,7 +81,7 @@
}
internal set
{
- var loop = value.ToArray();;
+ var loop = value.ToArray();
CheckValidLoop(loop);
outerLoop = loop;
}
@@ -246,7 +245,7 @@
private IEnumerable GetLoopIntersectionHeights(IEnumerable loop, double atX)
{
var segment2Ds = loop.ToArray();
- if(segment2Ds.Any(segment => IsVerticalAtX(segment, atX)))
+ if (segment2Ds.Any(segment => IsVerticalAtX(segment, atX)))
{
var message = string.Format(Resources.Error_Can_not_determine_1D_profile_with_vertical_segments_at_X_0_, atX);
throw new SoilLayer2DConversionException(message);
Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingApplicationPlugin.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingApplicationPlugin.cs (.../PipingApplicationPlugin.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingApplicationPlugin.cs (.../PipingApplicationPlugin.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -20,7 +20,6 @@
// All rights preserved.
using System.Collections.Generic;
-using Core.Common.Base;
using Core.Common.Base.IO;
using Core.Common.Base.Plugin;
using Ringtoets.Piping.Plugin.FileImporter;
Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingRibbon.xaml.cs
===================================================================
diff -u -rc8848af0c6f8780634dcce2013e606f090da6577 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingRibbon.xaml.cs (.../PipingRibbon.xaml.cs) (revision c8848af0c6f8780634dcce2013e606f090da6577)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingRibbon.xaml.cs (.../PipingRibbon.xaml.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -20,7 +20,6 @@
// All rights preserved.
using System.Collections.Generic;
-using Core.Common.Controls;
using Core.Common.Controls.Commands;
using Core.Common.Gui.Forms;
using Fluent;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingOutputTest.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingOutputTest.cs (.../PipingOutputTest.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingOutputTest.cs (.../PipingOutputTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,8 +1,6 @@
using System;
using NUnit.Framework;
-using Ringtoets.Piping.Data;
-
namespace Ringtoets.Piping.Data.Test
{
public class PipingOutputTest
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingSoilLayerTest.cs
===================================================================
diff -u -ra950714ad9510756331d862aa35695fa0b2ed03b -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingSoilLayerTest.cs (.../PipingSoilLayerTest.cs) (revision a950714ad9510756331d862aa35695fa0b2ed03b)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/PipingSoilLayerTest.cs (.../PipingSoilLayerTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,8 +1,6 @@
using System;
using NUnit.Framework;
-using Ringtoets.Piping.Data;
-
namespace Ringtoets.Piping.Data.Test
{
public class PipingSoilLayerTest
Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil.Test/Properties/AssemblyInfo.cs
===================================================================
diff -u -rf48e1f03fef1dd8f0bd623e308b3ee9234152e96 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision f48e1f03fef1dd8f0bd623e308b3ee9234152e96)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Data.TestUtil.Test/Properties/AssemblyInfo.cs (.../AssemblyInfo.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,10 +1,10 @@
using System.Reflection;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
+
[assembly: AssemblyTitle("Ringtoets.Piping.Data.TestUtil.Test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
@@ -17,9 +17,11 @@
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
+
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
+
[assembly: Guid("38c88ec9-4f74-4656-9b86-4d77aefcf579")]
// Version information for an assembly consists of the following four values:
@@ -32,5 +34,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
+
[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
\ No newline at end of file
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs
===================================================================
diff -u -rb92517dbc9956b930a6cfc7f96a1f762dfa41cf6 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs (.../PipingCalculationGroupContextPropertiesTest.cs) (revision b92517dbc9956b930a6cfc7f96a1f762dfa41cf6)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/PipingCalculationGroupContextPropertiesTest.cs (.../PipingCalculationGroupContextPropertiesTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,19 +1,13 @@
using System.Linq;
-
using Core.Common.Base;
using Core.Common.Gui;
using Core.Common.Gui.Attributes;
-using Core.Common.Utils.Attributes;
using Core.Common.Utils.Reflection;
-
using NUnit.Framework;
-
using Rhino.Mocks;
-
using Ringtoets.Piping.Data;
using Ringtoets.Piping.Forms.PresentationObjects;
using Ringtoets.Piping.Forms.PropertyClasses;
-
using PropertyInfo = System.Reflection.PropertyInfo;
namespace Ringtoets.Piping.Forms.Test.PropertyClasses
@@ -92,7 +86,7 @@
string propertyName = TypeUtils.GetMemberName(p => p.Name);
PropertyInfo nameProperty = properties.GetType().GetProperty(propertyName);
-
+
// Call
object[] namePropertyAttributes = nameProperty.GetCustomAttributes(false);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingCalculationGroupContextTreeNodeInfoTest.cs (.../PipingCalculationGroupContextTreeNodeInfoTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -19,18 +19,13 @@
using RingtoetsFormsResources = Ringtoets.Common.Forms.Properties.Resources;
using PipingFormsResources = Ringtoets.Piping.Forms.Properties.Resources;
using CoreCommonGuiResources = Core.Common.Gui.Properties.Resources;
+using TreeView = System.Windows.Forms.TreeView;
namespace Ringtoets.Piping.Forms.Test.TreeNodeInfos
{
[TestFixture]
public class PipingCalculationGroupContextTreeNodeInfoTest : NUnitFormTest
{
- private const int contextMenuAddCalculationGroupIndex = 0;
- private const int contextMenuAddCalculationIndex = 1;
- private const int contextMenuValidateAllIndex = 3;
- private const int contextMenuCalculateAllIndex = 4;
- private const int contextMenuClearOutputIndex = 5;
-
private MockRepository mocks;
private PipingGuiPlugin plugin;
private TreeNodeInfo info;
@@ -117,7 +112,7 @@
PipingCalculationGroup targetGroup;
PipingCalculationGroupContext targetGroupContext;
CreatePipingCalculationGroupAndContext(out targetGroup, out targetGroupContext);
-
+
var failureMechanism = new PipingFailureMechanism();
failureMechanism.CalculationsGroup.Children.Add(draggedItem);
failureMechanism.CalculationsGroup.Children.Add(targetGroup);
@@ -143,7 +138,6 @@
mocks.ReplayAll();
-
switch (methodToTest)
{
case DragDropTestMethod.CanDrop:
@@ -548,7 +542,7 @@
{
// Setup
var failureMechanism = new PipingFailureMechanism();
-
+
var parentNode = mocks.Stub();
parentNode.Tag = failureMechanism;
@@ -643,8 +637,8 @@
var parentGroup = new PipingCalculationGroup();
parentGroup.Children.Add(group);
var parentNodeData = new PipingCalculationGroupContext(parentGroup,
- Enumerable.Empty(),
- Enumerable.Empty());
+ Enumerable.Empty(),
+ Enumerable.Empty());
mocks.ReplayAll();
@@ -667,8 +661,8 @@
var parentGroup = new PipingCalculationGroup();
var parentNodeData = new PipingCalculationGroupContext(parentGroup,
- Enumerable.Empty(),
- Enumerable.Empty());
+ Enumerable.Empty(),
+ Enumerable.Empty());
// Precondition
CollectionAssert.DoesNotContain(parentGroup.Children, group);
@@ -697,10 +691,10 @@
var parentGroup = new PipingCalculationGroup();
parentGroup.Children.Add(group);
var parentNodeData = new PipingCalculationGroupContext(parentGroup,
- Enumerable.Empty(),
- Enumerable.Empty());
+ Enumerable.Empty(),
+ Enumerable.Empty());
parentNodeData.Attach(observer);
-
+
// Precondition
Assert.IsTrue(info.CanRemove(nodeData, parentNodeData));
@@ -728,8 +722,8 @@
});
var parentData = new PipingCalculationGroupContext(parentGroup,
- Enumerable.Empty(),
- Enumerable.Empty());
+ Enumerable.Empty(),
+ Enumerable.Empty());
var nodeData = new PipingCalculationGroupContext(group,
Enumerable.Empty(),
@@ -755,7 +749,7 @@
mocks.ReplayAll();
plugin.Gui = gui;
-
+
// Call
ContextMenuStrip menu = info.ContextMenuStrip(nodeData, node, info);
@@ -819,7 +813,14 @@
CoreCommonGuiResources.Properties_ToolTip,
CoreCommonGuiResources.PropertiesIcon,
false);
- CollectionAssert.AllItemsAreInstancesOfType(new[] { menu.Items[2], menu.Items[6], menu.Items[9], menu.Items[12], menu.Items[15] }, typeof(ToolStripSeparator));
+ CollectionAssert.AllItemsAreInstancesOfType(new[]
+ {
+ menu.Items[2],
+ menu.Items[6],
+ menu.Items[9],
+ menu.Items[12],
+ menu.Items[15]
+ }, typeof(ToolStripSeparator));
mocks.VerifyAll();
}
@@ -921,7 +922,14 @@
CoreCommonGuiResources.Properties_ToolTip,
CoreCommonGuiResources.PropertiesIcon,
false);
- CollectionAssert.AllItemsAreInstancesOfType(new[] { menu.Items[2], menu.Items[6], menu.Items[8], menu.Items[11], menu.Items[14] }, typeof(ToolStripSeparator));
+ CollectionAssert.AllItemsAreInstancesOfType(new[]
+ {
+ menu.Items[2],
+ menu.Items[6],
+ menu.Items[8],
+ menu.Items[11],
+ menu.Items[14]
+ }, typeof(ToolStripSeparator));
mocks.VerifyAll();
}
@@ -1019,7 +1027,13 @@
CoreCommonGuiResources.Properties_ToolTip,
CoreCommonGuiResources.PropertiesIcon,
false);
- CollectionAssert.AllItemsAreInstancesOfType(new[] { menu.Items[2], menu.Items[6], menu.Items[9], menu.Items[12] }, typeof(ToolStripSeparator));
+ CollectionAssert.AllItemsAreInstancesOfType(new[]
+ {
+ menu.Items[2],
+ menu.Items[6],
+ menu.Items[9],
+ menu.Items[12]
+ }, typeof(ToolStripSeparator));
mocks.VerifyAll();
}
@@ -1053,7 +1067,6 @@
plugin.Gui = gui;
-
// Call
ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, node, info);
@@ -1068,7 +1081,6 @@
mocks.VerifyAll(); // Expect no calls on arguments
}
-
[Test]
public void GetContextMenu_ClickOnAddGroupItem_AddGroupToCalculationGroupAndNotifyObservers()
{
@@ -1089,7 +1101,7 @@
var newCalculationGroupContextNode = new TreeNode();
// Parent node of newly added item, should be expanded from collapsed state to show selected node:
- var treeView = new System.Windows.Forms.TreeView();
+ var treeView = new TreeView();
var parentNode = new TreeNode();
var node = new TreeNode
{
@@ -1111,7 +1123,7 @@
group.Children.Add(calculationItem);
nodeData.Attach(observer);
-
+
ContextMenuStrip contextMenu = info.ContextMenuStrip(nodeData, node, info);
// Precondition
@@ -1125,10 +1137,10 @@
var newlyAddedItem = group.Children.Last();
Assert.IsInstanceOf(newlyAddedItem);
Assert.AreEqual("Nieuwe map (1)", newlyAddedItem.Name,
- "An item with the same name default name already exists, therefore '(1)' needs to be appended.");
+ "An item with the same name default name already exists, therefore '(1)' needs to be appended.");
Assert.AreSame(newCalculationGroupContextNode, treeView.SelectedNode,
- "The node of the newly added item should be selected.");
+ "The node of the newly added item should be selected.");
mocks.VerifyAll();
}
@@ -1153,15 +1165,15 @@
var newCalculationContextNode = new TreeNode();
// Parent node of newly added item, should be expanded from collapsed state to show selected node:
- var treeView = new System.Windows.Forms.TreeView();
+ var treeView = new TreeView();
var parentNode = new TreeNode();
var node = new TreeNode
{
Tag = nodeData
};
node.Nodes.Add(newCalculationContextNode);
node.Collapse();
-
+
parentNode.Nodes.Add(node);
treeView.Nodes.Add(parentNode);
@@ -1189,10 +1201,10 @@
var newlyAddedItem = group.Children.Last();
Assert.IsInstanceOf(newlyAddedItem);
Assert.AreEqual("Nieuwe berekening (1)", newlyAddedItem.Name,
- "An item with the same name default name already exists, therefore '(1)' needs to be appended.");
+ "An item with the same name default name already exists, therefore '(1)' needs to be appended.");
Assert.AreSame(newCalculationContextNode, node.TreeView.SelectedNode,
- "The node of the newly added item should be selected.");
+ "The node of the newly added item should be selected.");
mocks.VerifyAll();
}
@@ -1221,7 +1233,7 @@
var childGroup = new PipingCalculationGroup();
childGroup.Children.Add(validCalculation);
-
+
var emptyChildGroup = new PipingCalculationGroup();
var group = new PipingCalculationGroup();
@@ -1233,7 +1245,7 @@
Enumerable.Empty());
var contextMenu = info.ContextMenuStrip(nodeData, node, info);
-
+
// Call
Action call = () => contextMenu.Items[contextMenuValidateAllIndex].PerformClick();
@@ -1336,7 +1348,7 @@
var childGroup = new PipingCalculationGroup();
childGroup.Children.Add(calculation1);
-
+
var emptyChildGroup = new PipingCalculationGroup();
var group = new PipingCalculationGroup();
@@ -1398,11 +1410,11 @@
{
// Setup
var calculationItem = mocks.StrictMock();
-
+
mocks.ReplayAll();
var childCalculation = new PipingCalculation();
-
+
var childGroup = new PipingCalculationGroup();
var group = new PipingCalculationGroup();
@@ -1413,20 +1425,25 @@
Enumerable.Empty(),
Enumerable.Empty());
-
// Call
var children = info.ChildNodeObjects(nodeData).ToArray();
// Assert
Assert.AreEqual(group.Children.Count, children.Length);
Assert.AreSame(calculationItem, children[0]);
- var returnedCalculationContext = (PipingCalculationContext)children[1];
+ var returnedCalculationContext = (PipingCalculationContext) children[1];
Assert.AreSame(childCalculation, returnedCalculationContext.WrappedData);
- var returnedCalculationGroupContext = (PipingCalculationGroupContext)children[2];
+ var returnedCalculationGroupContext = (PipingCalculationGroupContext) children[2];
Assert.AreSame(childGroup, returnedCalculationGroupContext.WrappedData);
mocks.VerifyAll();
}
+ private const int contextMenuAddCalculationGroupIndex = 0;
+ private const int contextMenuAddCalculationIndex = 1;
+ private const int contextMenuValidateAllIndex = 3;
+ private const int contextMenuCalculateAllIndex = 4;
+ private const int contextMenuClearOutputIndex = 5;
+
///
/// Creates a stub that is in the expanded state.
///
@@ -1482,7 +1499,7 @@
nodeToBeCollapsed.Nodes.AddRange(childNodes);
return nodeToBeCollapsed;
}
-
+
///
/// Creates an stub that expects its
/// method will be called once.
@@ -1556,7 +1573,7 @@
}
///
- /// Use to creates a stub tree node as a simple node-tree leaf.
+ /// Use to creates a stub tree node as a simple node-tree leaf.
///
private TreeNode CreateStubTreeNode()
{
@@ -1584,6 +1601,7 @@
/// Indicates .
///
CanDrop,
+
///
/// Indicates .
///
@@ -1599,6 +1617,7 @@
/// Indicates .
///
Calculation,
+
///
/// Indicates .
///
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs
===================================================================
diff -u -rb6d165f6edddc4271e94c5f6d70c12d4ba0c60eb -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision b6d165f6edddc4271e94c5f6d70c12d4ba0c60eb)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TreeNodeInfos/PipingFailureMechanismTreeNodeInfoTest.cs (.../PipingFailureMechanismTreeNodeInfoTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,5 +1,4 @@
-using System.Collections.Generic;
-using System.Linq;
+using System.Linq;
using System.Windows.Forms;
using Core.Common.Base;
using Core.Common.Controls.TreeView;
@@ -24,7 +23,7 @@
{
public class PipingFailureMechanismTreeNodeInfoTest : NUnitFormTest
{
- private const int contextMenuAddFolderIndex = 0;
+ private const int contextMenuAddFolderIndex = 0;
private const int contextMenuAddCalculationIndex = 1;
private const int contextMenuValidateAllIndex = 3;
private const int contextMenuCalculateAllIndex = 4;
@@ -98,7 +97,7 @@
// Assert
Assert.AreEqual(3, children.Length);
- var inputsFolder = (CategoryTreeFolder)children[0];
+ var inputsFolder = (CategoryTreeFolder) children[0];
Assert.AreEqual("Invoer", inputsFolder.Name);
Assert.AreEqual(TreeFolderCategory.Input, inputsFolder.Category);
CollectionAssert.AreEqual(new object[]
@@ -109,13 +108,13 @@
pipingFailureMechanism.BoundaryConditions
}, inputsFolder.Contents);
- var calculationsFolder = (PipingCalculationGroupContext)children[1];
+ var calculationsFolder = (PipingCalculationGroupContext) children[1];
Assert.AreEqual("Berekeningen", calculationsFolder.WrappedData.Name);
CollectionAssert.AreEqual(pipingFailureMechanism.CalculationsGroup.Children, calculationsFolder.WrappedData.Children);
Assert.AreSame(pipingFailureMechanism.SurfaceLines, calculationsFolder.AvailablePipingSurfaceLines);
Assert.AreSame(pipingFailureMechanism.SoilProfiles, calculationsFolder.AvailablePipingSoilProfiles);
- var outputsFolder = (CategoryTreeFolder)children[2];
+ var outputsFolder = (CategoryTreeFolder) children[2];
Assert.AreEqual("Uitvoer", outputsFolder.Name);
Assert.AreEqual(TreeFolderCategory.Output, outputsFolder.Category);
CollectionAssert.AreEqual(new object[]
@@ -228,7 +227,12 @@
TestHelper.AssertContextMenuStripContainsItem(menu, 10, CoreCommonGuiResources.Expand_all, CoreCommonGuiResources.Expand_all_ToolTip, CoreCommonGuiResources.ExpandAllIcon, false);
TestHelper.AssertContextMenuStripContainsItem(menu, 11, CoreCommonGuiResources.Collapse_all, CoreCommonGuiResources.Collapse_all_ToolTip, CoreCommonGuiResources.CollapseAllIcon, false);
- CollectionAssert.AllItemsAreInstancesOfType(new[] { menu.Items[2], menu.Items[6], menu.Items[9] }, typeof(ToolStripSeparator));
+ CollectionAssert.AllItemsAreInstancesOfType(new[]
+ {
+ menu.Items[2],
+ menu.Items[6],
+ menu.Items[9]
+ }, typeof(ToolStripSeparator));
mocks.VerifyAll();
}
@@ -259,7 +263,7 @@
mocks.VerifyAll(); // Expect no calls on arguments
}
-
+
[Test]
public void ContextMenuStrip_PipingFailureMechanismWithOutput_ClearAllOutputEnabled()
{
@@ -291,7 +295,7 @@
mocks.VerifyAll(); // Expect no calls on arguments
}
-
+
[Test]
public void ContextMenuStrip_PipingFailureMechanismWithNoCalculations_ValidateAndCalculateAllDisabled()
{
@@ -359,25 +363,26 @@
mocks.VerifyAll();
}
-// [Test]
-// public void ContextMenuStrip_ClickOnAddCalculationItem_NewPipingCalculationInstanceAddedToFailureMechanismAndNotifyObservers()
-// {
-// // Setup
-// var failureMechanism = new PipingFailureMechanism();
-// failureMechanism.CalculationsGroup.Children.Clear();
-// failureMechanism.CalculationsGroup.Children.Add(new PipingCalculation());
+// {
+// failureMechanismNode.Nodes.AddRange(new []
+// failureMechanismNode.Collapse();
+// var failureMechanismNode = new TreeNode();
//
-// var treeView = new Core.Common.Controls.TreeView.TreeView();
+// failureMechanismCalculationsNode.Collapse();
+// var failureMechanismCalculationsNode = new TreeNode();
//
// var menuBuilder = new CustomItemsOnlyContextMenuBuilder();
//
-// var failureMechanismCalculationsNode = new TreeNode();
-// failureMechanismCalculationsNode.Collapse();
+// var treeView = new Core.Common.Controls.TreeView.TreeView();
//
-// var failureMechanismNode = new TreeNode();
-// failureMechanismNode.Collapse();
-// failureMechanismNode.Nodes.AddRange(new []
-// {
+// failureMechanism.CalculationsGroup.Children.Add(new PipingCalculation());
+// failureMechanism.CalculationsGroup.Children.Clear();
+// var failureMechanism = new PipingFailureMechanism();
+// // Setup
+// {
+// public void ContextMenuStrip_ClickOnAddCalculationItem_NewPipingCalculationInstanceAddedToFailureMechanismAndNotifyObservers()
+
+// [Test]
// new TreeNode(),
// failureMechanismCalculationsNode,
// new TreeNode()
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/PropertyDescriptors/TextPropertyDescriptorDecoratorTest.cs
===================================================================
diff -u -r5076e379f409c3b5ba41eb98256e3dd5d140571c -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/PropertyDescriptors/TextPropertyDescriptorDecoratorTest.cs (.../TextPropertyDescriptorDecoratorTest.cs) (revision 5076e379f409c3b5ba41eb98256e3dd5d140571c)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/TypeConverters/PropertyDescriptors/TextPropertyDescriptorDecoratorTest.cs (.../TextPropertyDescriptorDecoratorTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,12 +1,7 @@
using System.ComponentModel;
-
using Core.Common.Base;
-
using NUnit.Framework;
-
using Rhino.Mocks;
-
-using Ringtoets.Piping.Forms.TypeConverters;
using Ringtoets.Piping.Forms.TypeConverters.PropertyDescriptors;
namespace Ringtoets.Piping.Forms.Test.TypeConverters.PropertyDescriptors
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingApplicationPluginTest.cs
===================================================================
diff -u -r1f79b34c12554e2b9878f6296168d18232cc9852 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingApplicationPluginTest.cs (.../PipingApplicationPluginTest.cs) (revision 1f79b34c12554e2b9878f6296168d18232cc9852)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingApplicationPluginTest.cs (.../PipingApplicationPluginTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,5 +1,4 @@
using System.Linq;
-using Core.Common.Base;
using Core.Common.Base.Plugin;
using NUnit.Framework;
using Ringtoets.Piping.Plugin.FileImporter;
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingFileImporterProviderTest.cs
===================================================================
diff -u -r1f79b34c12554e2b9878f6296168d18232cc9852 -r0bfd1f4e2a179c8575045e5af70dce2930665626
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingFileImporterProviderTest.cs (.../PipingFileImporterProviderTest.cs) (revision 1f79b34c12554e2b9878f6296168d18232cc9852)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/PipingFileImporterProviderTest.cs (.../PipingFileImporterProviderTest.cs) (revision 0bfd1f4e2a179c8575045e5af70dce2930665626)
@@ -1,9 +1,6 @@
using System.Linq;
-
-using Core.Common.Base;
using Core.Common.Base.IO;
using NUnit.Framework;
-
using Ringtoets.Piping.Plugin.FileImporter;
namespace Ringtoets.Piping.Plugin.Test