Index: Application/Ringtoets/test/Application.Ringtoets.Migration.Core.Test/RingtoetsDatabaseSourceFileTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Application/Ringtoets/test/Application.Ringtoets.Migration.Core.Test/RingtoetsDatabaseSourceFileTest.cs (.../RingtoetsDatabaseSourceFileTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Migration.Core.Test/RingtoetsDatabaseSourceFileTest.cs (.../RingtoetsDatabaseSourceFileTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -117,7 +117,7 @@ string version = file.GetVersion(); // Assert - Assert.AreEqual(string.Empty, version); + Assert.IsEmpty(version); } } } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/TestFailureMechanismSectionTest.cs =================================================================== diff -u -r3fb0df0ed6e64657154700ee7706e035d5bf99f5 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/TestFailureMechanismSectionTest.cs (.../TestFailureMechanismSectionTest.cs) (revision 3fb0df0ed6e64657154700ee7706e035d5bf99f5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil.Test/TestFailureMechanismSectionTest.cs (.../TestFailureMechanismSectionTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -38,7 +38,7 @@ { new Point2D(0, 0) }, section.Points); - Assert.AreEqual(string.Empty, section.Name); + Assert.IsEmpty(section.Name); } } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/Converters/DashStyleConverter.cs =================================================================== diff -u -r5c6072174d8047b062655d56d523d74c5e740039 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/src/Core.Common.Gui/Converters/DashStyleConverter.cs (.../DashStyleConverter.cs) (revision 5c6072174d8047b062655d56d523d74c5e740039) +++ Core/Common/src/Core.Common.Gui/Converters/DashStyleConverter.cs (.../DashStyleConverter.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -24,14 +24,13 @@ using System.Drawing.Drawing2D; using System.Globalization; using Core.Common.Gui.Properties; -using Core.Common.Utils; namespace Core.Common.Gui.Converters { /// /// A type converter to convert objects to and from various other representations. /// - public class DashStyleConverter : EnumTypeConverter + public class DashStyleConverter : EnumConverter { /// /// Creates a new instance of . Index: Core/Common/src/Core.Common.Gui/UITypeEditors/ColorEditor.cs =================================================================== diff -u -rb2cfd1d6f0d22011df44df97e970c9aa74e6ca58 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/src/Core.Common.Gui/UITypeEditors/ColorEditor.cs (.../ColorEditor.cs) (revision b2cfd1d6f0d22011df44df97e970c9aa74e6ca58) +++ Core/Common/src/Core.Common.Gui/UITypeEditors/ColorEditor.cs (.../ColorEditor.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -25,6 +25,7 @@ using System.Drawing.Design; using System.Windows.Forms; using System.Windows.Forms.Design; +using System.Windows.Forms.PropertyGridInternal; namespace Core.Common.Gui.UITypeEditors { @@ -40,9 +41,7 @@ public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { - var service = (IWindowsFormsEditorService) provider.GetService(typeof(IWindowsFormsEditorService)); - - if (service != null) + if (value is Color) { var color = (Color) value; @@ -75,8 +74,6 @@ { e.Graphics.FillRectangle(brush, e.Bounds); } - - e.Graphics.DrawRectangle(Pens.Black, e.Bounds); } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -425,8 +425,8 @@ Assert.AreEqual($"column_{propertyName}", columnData.Name); Assert.AreEqual(headerText, columnData.HeaderText); Assert.IsNull(columnData.DataSource); - Assert.AreEqual(string.Empty, columnData.ValueMember); - Assert.AreEqual(string.Empty, columnData.DisplayMember); + Assert.IsEmpty(columnData.ValueMember); + Assert.IsEmpty(columnData.DisplayMember); Assert.AreEqual(autoSizeMode, columnData.AutoSizeMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, columnData.HeaderCell.Style.Alignment); } @@ -458,8 +458,8 @@ Assert.AreEqual($"column_{propertyName}", columnData.Name); Assert.AreEqual(headerText, columnData.HeaderText); Assert.IsNull(columnData.DataSource); - Assert.AreEqual(string.Empty, columnData.ValueMember); - Assert.AreEqual(string.Empty, columnData.DisplayMember); + Assert.IsEmpty(columnData.ValueMember); + Assert.IsEmpty(columnData.DisplayMember); Assert.AreEqual(DataGridViewAutoSizeColumnMode.AllCells, columnData.AutoSizeMode); Assert.AreEqual(DataGridViewContentAlignment.MiddleCenter, columnData.HeaderCell.Style.Alignment); } @@ -1596,7 +1596,7 @@ dataGridViewCell.Value = "New value"; // Assert - Assert.AreEqual(string.Empty, dataGridViewCell.OwningRow.ErrorText); + Assert.IsEmpty(dataGridViewCell.OwningRow.ErrorText); } } @@ -1650,7 +1650,7 @@ // Precondition Assert.IsTrue(control.IsCurrentCellInEditMode); - Assert.AreEqual(string.Empty, control.Rows[0].ErrorText); + Assert.IsEmpty(control.Rows[0].ErrorText); // Call gridTester.FireEvent("Leave", EventArgs.Empty); @@ -1694,7 +1694,7 @@ gridTester.FireEvent("Leave", EventArgs.Empty); // Assert - Assert.AreEqual(string.Empty, control.Rows[0].ErrorText); + Assert.IsEmpty(control.Rows[0].ErrorText); Assert.AreEqual(initialValue.ToString(CultureInfo.CurrentCulture), dataGridViewCell.FormattedValue); } } Index: Core/Common/test/Core.Common.Gui.Test/Converters/ColorTypeConverterTest.cs =================================================================== diff -u -rb2cfd1d6f0d22011df44df97e970c9aa74e6ca58 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/test/Core.Common.Gui.Test/Converters/ColorTypeConverterTest.cs (.../ColorTypeConverterTest.cs) (revision b2cfd1d6f0d22011df44df97e970c9aa74e6ca58) +++ Core/Common/test/Core.Common.Gui.Test/Converters/ColorTypeConverterTest.cs (.../ColorTypeConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -19,11 +19,9 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.ComponentModel; using System.Drawing; using Core.Common.Gui.Converters; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Common.Gui.Test.Converters { @@ -44,18 +42,13 @@ public void GetStandardValuesSupported_Always_ReturnFalse() { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - var converter = new ColorTypeConverter(); // Call - bool standardValuesSupported = converter.GetStandardValuesSupported(context); + bool standardValuesSupported = converter.GetStandardValuesSupported(null); // Assert Assert.IsFalse(standardValuesSupported); - mocks.VerifyAll(); } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Converters/DashStyleConverterTest.cs =================================================================== diff -u -r5c6072174d8047b062655d56d523d74c5e740039 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/test/Core.Common.Gui.Test/Converters/DashStyleConverterTest.cs (.../DashStyleConverterTest.cs) (revision 5c6072174d8047b062655d56d523d74c5e740039) +++ Core/Common/test/Core.Common.Gui.Test/Converters/DashStyleConverterTest.cs (.../DashStyleConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -24,9 +24,7 @@ using System.Drawing.Drawing2D; using System.Globalization; using Core.Common.Gui.Converters; -using Core.Common.Utils; using NUnit.Framework; -using Rhino.Mocks; namespace Core.Common.Gui.Test.Converters { @@ -40,26 +38,21 @@ var converter = new DashStyleConverter(typeof(DashStyle)); // Assert - Assert.IsInstanceOf(converter); + Assert.IsInstanceOf(converter); } [Test] public void ConvertTo_ValueNoDashStyle_ThrowNotSupportedException() { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - var originalValue = new object(); var converter = new DashStyleConverter(typeof(DashStyle)); // Call - TestDelegate test = () => converter.ConvertTo(context, CultureInfo.InvariantCulture, originalValue, typeof(DashStyle)); + TestDelegate test = () => converter.ConvertTo(null, CultureInfo.InvariantCulture, originalValue, typeof(DashStyle)); // Assert Assert.Throws(test); - mocks.VerifyAll(); } [Test] @@ -71,56 +64,41 @@ public void ConvertTo_ValueValidDashStyle_ReturnStringValue(DashStyle originalValue, string expectedConvertedValue) { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - var converter = new DashStyleConverter(typeof(DashStyle)); // Call - object converterdValue = converter.ConvertTo(context, CultureInfo.InvariantCulture, originalValue, typeof(DashStyle)); + object converterdValue = converter.ConvertTo(null, CultureInfo.InvariantCulture, originalValue, typeof(DashStyle)); // Assert Assert.AreEqual(expectedConvertedValue, converterdValue); - mocks.VerifyAll(); } [Test] public void ConvertTo_InvalidDashStyleValue_ThrowArgumentOutOfRangeException() { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - const DashStyle originalValue = (DashStyle) 100; var converter = new DashStyleConverter(typeof(DashStyle)); // Call - TestDelegate test = () => converter.ConvertTo(context, CultureInfo.InvariantCulture, originalValue, typeof(DashStyle)); + TestDelegate test = () => converter.ConvertTo(null, CultureInfo.InvariantCulture, originalValue, typeof(DashStyle)); // Assert Assert.Throws(test); - mocks.VerifyAll(); } [Test] public void ConvertFrom_ValueNoString_ThrowNotSupportedException() { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - var originalValue = new object(); var converter = new DashStyleConverter(typeof(DashStyle)); // Call - TestDelegate test = () => converter.ConvertFrom(context, CultureInfo.InvariantCulture, originalValue); + TestDelegate test = () => converter.ConvertFrom(null, CultureInfo.InvariantCulture, originalValue); // Assert Assert.Throws(test); - mocks.VerifyAll(); } [Test] @@ -132,37 +110,27 @@ public void ConvertFrom_ValidString_ReturnDashStyle(string stringValue, DashStyle expectedDashStyle) { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - var converter = new DashStyleConverter(typeof(DashStyle)); // Call - object converterdValue = converter.ConvertFrom(context, CultureInfo.InvariantCulture, stringValue); + object converterdValue = converter.ConvertFrom(null, CultureInfo.InvariantCulture, stringValue); // Assert Assert.AreEqual(expectedDashStyle, converterdValue); - mocks.VerifyAll(); } [Test] public void ConvertFrom_InvalidStringValue_ThrowFormatException() { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - const string originalValue = "test"; var converter = new DashStyleConverter(typeof(DashStyle)); // Call - TestDelegate test = () => converter.ConvertFrom(context, CultureInfo.InvariantCulture, originalValue); + TestDelegate test = () => converter.ConvertFrom(null, CultureInfo.InvariantCulture, originalValue); // Assert Assert.Throws(test); - mocks.VerifyAll(); } } } \ No newline at end of file Index: Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/DocumentViewControllerTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/DocumentViewControllerTest.cs (.../DocumentViewControllerTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Common/test/Core.Common.Gui.Test/Forms/ViewHost/DocumentViewControllerTest.cs (.../DocumentViewControllerTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -245,7 +245,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); mocks.VerifyAll(); } @@ -279,7 +279,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); mocks.VerifyAll(); } @@ -320,7 +320,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); mocks.VerifyAll(); } @@ -398,7 +398,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); mocks.VerifyAll(); } @@ -445,7 +445,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); Assert.IsTrue(documentViewController.DefaultViewTypes.ContainsKey(typeof(object))); Assert.AreEqual(documentViewController.DefaultViewTypes[typeof(object)], typeof(TestView)); mocks.VerifyAll(); @@ -494,7 +494,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); Assert.IsTrue(documentViewController.DefaultViewTypes.ContainsKey(typeof(object))); Assert.AreEqual(documentViewController.DefaultViewTypes[typeof(object)], typeof(TestView)); mocks.VerifyAll(); @@ -532,7 +532,7 @@ // Assert Assert.IsTrue(result); Assert.AreEqual(data, view.Data); - Assert.AreEqual(string.Empty, view.Text); + Assert.IsEmpty(view.Text); mocks.VerifyAll(); } Index: Core/Common/test/Core.Common.Gui.Test/UITypeEditors/ColorEditorTest.cs =================================================================== diff -u -rb2cfd1d6f0d22011df44df97e970c9aa74e6ca58 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Common/test/Core.Common.Gui.Test/UITypeEditors/ColorEditorTest.cs (.../ColorEditorTest.cs) (revision b2cfd1d6f0d22011df44df97e970c9aa74e6ca58) +++ Core/Common/test/Core.Common.Gui.Test/UITypeEditors/ColorEditorTest.cs (.../ColorEditorTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -20,17 +20,24 @@ // All rights reserved. using System; -using System.ComponentModel; +using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.Drawing.Design; +using System.Windows; +using System.Windows.Forms; +using System.Windows.Forms.Design; +using System.Windows.Interop; using Core.Common.Gui.UITypeEditors; +using Core.Common.TestUtil; +using NUnit.Extensions.Forms; using NUnit.Framework; using Rhino.Mocks; namespace Core.Common.Gui.Test.UITypeEditors { [TestFixture] - public class ColorEditorTest + public class ColorEditorTest : NUnitFormTest { [Test] public void DefaultConstructor_ReturnsNewInstance() @@ -46,37 +53,27 @@ public void GetEditStyle_Always_ReturnUITypeEditorEditStyleModal() { // Setup - var mocks = new MockRepository(); - var context = mocks.Stub(); - mocks.ReplayAll(); - var editor = new ColorEditor(); // Call - UITypeEditorEditStyle editStyle = editor.GetEditStyle(context); + UITypeEditorEditStyle editStyle = editor.GetEditStyle(null); // Assert Assert.AreEqual(UITypeEditorEditStyle.Modal, editStyle); - mocks.VerifyAll(); } [Test] - public void EditValue_WithoutService_ReturnEqualValue() + public void EditValue_WithOtherValue_ReturnSameValue() { - var mocks = new MockRepository(); - var context = mocks.Stub(); - var provider = mocks.Stub(); - mocks.ReplayAll(); - + // Setup var editor = new ColorEditor(); - Color color = Color.Beige; + object value = new object(); // Call - object value = editor.EditValue(context, provider, color); + object editedValue = editor.EditValue(null, null, value); // Assert - Assert.AreEqual(color, value); - mocks.VerifyAll(); + Assert.AreSame(value, editedValue); } [Test] @@ -92,4 +89,4 @@ Assert.IsTrue(paintValueSupported); } } -} +} \ No newline at end of file Index: Core/Components/src/Core.Components.Gis/Data/MapLineData.cs =================================================================== diff -u -rf138d6ce4b07a5b92c3eeca7b34be98cbcbc369e -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/src/Core.Components.Gis/Data/MapLineData.cs (.../MapLineData.cs) (revision f138d6ce4b07a5b92c3eeca7b34be98cbcbc369e) +++ Core/Components/src/Core.Components.Gis/Data/MapLineData.cs (.../MapLineData.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -41,10 +41,14 @@ /// Thrown when is /// null or only whitespace. public MapLineData(string name) - : this(name, new LineStyle(Color.Black, 2, DashStyle.Solid)) {} + : this(name, new LineStyle { + Color = Color.Black, + Width = 2, + DashStyle = DashStyle.Solid + }) {} /// - /// Creates a new instance of with default styling. + /// Creates a new instance of . /// /// The name of the . /// The style of the data. Index: Core/Components/src/Core.Components.Gis/Data/MapPointData.cs =================================================================== diff -u -rf138d6ce4b07a5b92c3eeca7b34be98cbcbc369e -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/src/Core.Components.Gis/Data/MapPointData.cs (.../MapPointData.cs) (revision f138d6ce4b07a5b92c3eeca7b34be98cbcbc369e) +++ Core/Components/src/Core.Components.Gis/Data/MapPointData.cs (.../MapPointData.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -40,7 +40,14 @@ /// Thrown when is /// null or only whitespace. public MapPointData(string name) - : this(name, new PointStyle(Color.Black, 2, PointSymbol.Square)) {} + : this(name, new PointStyle + { + Color = Color.Black, + Size = 2, + Symbol = PointSymbol.Square, + StrokeColor = Color.Black, + StrokeThickness = 1 + }) {} /// /// Creates a new instance of . Index: Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs =================================================================== diff -u -rf138d6ce4b07a5b92c3eeca7b34be98cbcbc369e -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs (.../MapPolygonData.cs) (revision f138d6ce4b07a5b92c3eeca7b34be98cbcbc369e) +++ Core/Components/src/Core.Components.Gis/Data/MapPolygonData.cs (.../MapPolygonData.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -40,7 +40,12 @@ /// Thrown when is /// null or only whitespace. public MapPolygonData(string name) - : this(name, new PolygonStyle(Color.DarkGray, Color.Black, 2)) {} + : this(name, new PolygonStyle + { + FillColor = Color.DarkGray, + StrokeColor = Color.Black, + StrokeThickness = 2 + }) {} /// /// Creates a new instance of . Index: Core/Components/src/Core.Components.Gis/Style/LineStyle.cs =================================================================== diff -u -re8c1804f4a27a708313b7ba2512512b62ad2d3e6 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/src/Core.Components.Gis/Style/LineStyle.cs (.../LineStyle.cs) (revision e8c1804f4a27a708313b7ba2512512b62ad2d3e6) +++ Core/Components/src/Core.Components.Gis/Style/LineStyle.cs (.../LineStyle.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -30,19 +30,6 @@ public class LineStyle { /// - /// Creates a new instance of . - /// - /// The color of the line. - /// The width of the line. - /// The of the line. - public LineStyle(Color color, int width, DashStyle dashStyle) - { - Color = color; - Width = width; - DashStyle = dashStyle; - } - - /// /// Gets or sets the line color. /// public Color Color { get; set; } Index: Core/Components/src/Core.Components.Gis/Style/PointStyle.cs =================================================================== diff -u -r9db03162dd78287d02807c92b35d7d967fac9c8a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/src/Core.Components.Gis/Style/PointStyle.cs (.../PointStyle.cs) (revision 9db03162dd78287d02807c92b35d7d967fac9c8a) +++ Core/Components/src/Core.Components.Gis/Style/PointStyle.cs (.../PointStyle.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -29,24 +29,6 @@ public class PointStyle { /// - /// Creates a new instance of . - /// - /// The color of the point. - /// The size of the point. - /// The symbol of the point. - public PointStyle(Color color, int size, PointSymbol symbol) - : this(color, size, symbol, color, 1) {} - - private PointStyle(Color color, int size, PointSymbol symbol, Color strokeColor, int strokeThickness) - { - Color = color; - Size = size; - Symbol = symbol; - StrokeColor = strokeColor; - StrokeThickness = strokeThickness; - } - - /// /// Gets or sets the point color. /// public Color Color { get; set; } Index: Core/Components/src/Core.Components.Gis/Style/PolygonStyle.cs =================================================================== diff -u -refe5cc540b802c2307b33eadaa7912e38b9d68a3 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/src/Core.Components.Gis/Style/PolygonStyle.cs (.../PolygonStyle.cs) (revision efe5cc540b802c2307b33eadaa7912e38b9d68a3) +++ Core/Components/src/Core.Components.Gis/Style/PolygonStyle.cs (.../PolygonStyle.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -29,19 +29,6 @@ public class PolygonStyle { /// - /// Creates a new instance of . - /// - /// The fill color of the polygon. - /// The stroke color of the polygon. - /// The stroke thickness of the polygon border. - public PolygonStyle(Color fillColor, Color strokeColor, int strokeThickness) - { - FillColor = fillColor; - StrokeColor = strokeColor; - StrokeThickness = strokeThickness; - } - - /// /// Gets or sets the polygon fill color. /// public Color FillColor { get; set; } Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/FeatureBasedMapDataConverterTest.cs (.../FeatureBasedMapDataConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -161,10 +161,10 @@ Assert.AreEqual(1.1.ToString(CultureInfo.CurrentCulture), dataRowCollection[0][0]); Assert.AreEqual("Feature 1", dataRowCollection[0][1]); Assert.AreEqual("Feature 1 extra", dataRowCollection[0][2]); - Assert.AreEqual(string.Empty, dataRowCollection[0][3].ToString()); + Assert.IsEmpty(dataRowCollection[0][3].ToString()); Assert.AreEqual(2.2.ToString(CultureInfo.CurrentCulture), dataRowCollection[1][0]); Assert.AreEqual("Feature 2", dataRowCollection[1][1]); - Assert.AreEqual(string.Empty, dataRowCollection[1][2].ToString()); + Assert.IsEmpty(dataRowCollection[1][2].ToString()); Assert.AreEqual("Feature 2 extra", dataRowCollection[1][3]); } Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs =================================================================== diff -u -r31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs (.../MapLineDataConverterTest.cs) (revision 31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapLineDataConverterTest.cs (.../MapLineDataConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -175,7 +175,12 @@ Color expectedColor = Color.FromKnownColor(color); var converter = new MapLineDataConverter(); var mapLineLayer = new MapLineLayer(); - var mapLineData = new MapLineData("test", new LineStyle(expectedColor, width, lineStyle)); + var mapLineData = new MapLineData("test", new LineStyle + { + Color = expectedColor, + Width = width, + DashStyle = lineStyle + }); // Call converter.ConvertLayerProperties(mapLineData, mapLineLayer); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs =================================================================== diff -u -r87e7ae8adaa94ef331aef3c47ba1d76dfd65a7c9 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs (.../MapPointDataConverterTest.cs) (revision 87e7ae8adaa94ef331aef3c47ba1d76dfd65a7c9) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPointDataConverterTest.cs (.../MapPointDataConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -158,7 +158,14 @@ var converter = new MapPointDataConverter(); var mapPointLayer = new MapPointLayer(); Color expectedColor = Color.FromKnownColor(color); - var mapPointData = new MapPointData("test", new PointStyle(expectedColor, width, pointStyle)); + var mapPointData = new MapPointData("test", new PointStyle + { + Color = expectedColor, + Size = width, + Symbol = pointStyle, + StrokeColor = expectedColor, + StrokeThickness = 1 + }); // Call converter.ConvertLayerProperties(mapPointData, mapPointLayer); Index: Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs =================================================================== diff -u -r7aa6b8425147795b1a87b552fe9d82ae5e9c7565 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs (.../MapPolygonDataConverterTest.cs) (revision 7aa6b8425147795b1a87b552fe9d82ae5e9c7565) +++ Core/Components/test/Core.Components.DotSpatial.Test/Converter/MapPolygonDataConverterTest.cs (.../MapPolygonDataConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -232,7 +232,12 @@ var mapPolygonLayer = new MapPolygonLayer(); Color expectedFillColor = Color.FromKnownColor(fillColor); Color expectedOutlineFillColor = Color.FromKnownColor(outlineFillColor); - var mapPolygonData = new MapPolygonData("test", new PolygonStyle(expectedFillColor, expectedOutlineFillColor, width)); + var mapPolygonData = new MapPolygonData("test", new PolygonStyle + { + FillColor = expectedFillColor, + StrokeColor = expectedOutlineFillColor, + StrokeThickness = width + }); // Call converter.ConvertLayerProperties(mapPolygonData, mapPolygonLayer); Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapLineDataLayerTest.cs =================================================================== diff -u -r31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapLineDataLayerTest.cs (.../MapLineDataLayerTest.cs) (revision 31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapLineDataLayerTest.cs (.../MapLineDataLayerTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -55,7 +55,12 @@ public void Constructor_MapLineDataWithTestProperties_MapLineDataLayerCreatedAccordingly() { // Setup - var mapLineData = new MapLineData("Test name", new LineStyle(Color.AliceBlue, 2, DashStyle.DashDot)); + var mapLineData = new MapLineData("Test name", new LineStyle + { + Color = Color.AliceBlue, + Width = 2, + DashStyle = DashStyle.DashDot + }); SetMapLineDataTestProperties(mapLineData); @@ -73,7 +78,12 @@ public void Update_MapLineDataWithTestProperties_MapLineDataLayerUpdatedAccordingly() { // Setup - var mapLineData = new MapLineData("Test name", new LineStyle(Color.AliceBlue, 2, DashStyle.DashDot)); + var mapLineData = new MapLineData("Test name", new LineStyle + { + Color = Color.AliceBlue, + Width = 2, + DashStyle = DashStyle.DashDot + }); var mapLineDataLayer = new MapLineDataLayer(mapLineData); SetMapLineDataTestProperties(mapLineData); Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPointDataLayerTest.cs =================================================================== diff -u -r7fc5e21f72a83b37ad5e4daca553fca84fe140ab -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPointDataLayerTest.cs (.../MapPointDataLayerTest.cs) (revision 7fc5e21f72a83b37ad5e4daca553fca84fe140ab) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPointDataLayerTest.cs (.../MapPointDataLayerTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -55,7 +55,15 @@ public void Constructor_MapPointDataWithTestProperties_MapPointDataLayerCreatedAccordingly() { // Setup - var mapPointData = new MapPointData("Test name", new PointStyle(Color.AliceBlue, 4, PointSymbol.Circle)); + Color color = Color.AliceBlue; + var mapPointData = new MapPointData("Test name", new PointStyle + { + Color = color, + Size = 4, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }); SetMapPointDataTestProperties(mapPointData); @@ -73,7 +81,15 @@ public void Update_MapPointDataWithTestProperties_MapPointDataLayerUpdatedAccordingly() { // Setup - var mapPointData = new MapPointData("Test name", new PointStyle(Color.AliceBlue, 4, PointSymbol.Circle)); + Color color = Color.AliceBlue; + var mapPointData = new MapPointData("Test name", new PointStyle + { + Color = color, + Size = 4, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }); var mapPointDataLayer = new MapPointDataLayer(mapPointData); SetMapPointDataTestProperties(mapPointData); @@ -155,7 +171,7 @@ Assert.IsTrue(mapPointDataLayer.ShowLabels); Assert.IsNotNull(mapPointDataLayer.LabelLayer); - Assert.AreEqual($"[{"2"}]", mapPointDataLayer.LabelLayer.Symbology.Categories[0].Expression); + Assert.AreEqual("[2]", mapPointDataLayer.LabelLayer.Symbology.Categories[0].Expression); var firstSymbol = (SimpleSymbol) mapPointDataLayer.Symbolizer.Symbols[0]; Assert.AreEqual(Color.AliceBlue, firstSymbol.Color); Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPolygonDataLayerTest.cs =================================================================== diff -u -r7aa6b8425147795b1a87b552fe9d82ae5e9c7565 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPolygonDataLayerTest.cs (.../MapPolygonDataLayerTest.cs) (revision 7aa6b8425147795b1a87b552fe9d82ae5e9c7565) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/MapPolygonDataLayerTest.cs (.../MapPolygonDataLayerTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -54,7 +54,12 @@ public void Constructor_MapPolygonDataWithTestProperties_MapPolygonDataLayerCreatedAccordingly() { // Setup - var mapPolygonData = new MapPolygonData("Test name", new PolygonStyle(Color.AliceBlue, Color.Azure, 2)); + var mapPolygonData = new MapPolygonData("Test name", new PolygonStyle + { + FillColor = Color.AliceBlue, + StrokeColor = Color.Azure, + StrokeThickness = 2 + }); SetMapPolygonDataTestProperties(mapPolygonData); @@ -72,7 +77,12 @@ public void Update_MapPolygonDataWithTestProperties_MapPolygonDataLayerUpdatedAccordingly() { // Setup - var mapPolygonData = new MapPolygonData("Test name", new PolygonStyle(Color.AliceBlue, Color.Azure, 2)); + var mapPolygonData = new MapPolygonData("Test name", new PolygonStyle + { + FillColor = Color.AliceBlue, + StrokeColor = Color.Azure, + StrokeThickness = 2 + }); var mapPolygonDataLayer = new MapPolygonDataLayer(mapPolygonData); SetMapPolygonDataTestProperties(mapPolygonData); Index: Core/Components/test/Core.Components.Gis.Test/Data/MapLineDataTest.cs =================================================================== diff -u -re8c1804f4a27a708313b7ba2512512b62ad2d3e6 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/MapLineDataTest.cs (.../MapLineDataTest.cs) (revision e8c1804f4a27a708313b7ba2512512b62ad2d3e6) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapLineDataTest.cs (.../MapLineDataTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -81,7 +81,12 @@ public void Constructor_WithStyle_ExpectedValues() { // Setup - var style = new LineStyle(Color.Red, 5, DashStyle.Dash); + var style = new LineStyle + { + Color = Color.Red, + Width = 5, + DashStyle = DashStyle.Dash + }; // Call var data = new MapLineData("test data", style); Index: Core/Components/test/Core.Components.Gis.Test/Data/MapPointDataTest.cs =================================================================== diff -u -r31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/MapPointDataTest.cs (.../MapPointDataTest.cs) (revision 31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapPointDataTest.cs (.../MapPointDataTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -82,7 +82,15 @@ public void Constructor_WithStyle_ExpectedValues() { // Setup - var style = new PointStyle(Color.Aqua, 3, PointSymbol.Circle); + Color color = Color.Aqua; + var style = new PointStyle + { + Color = color, + Size = 3, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }; // Call var data = new MapPointData("test data", style); Index: Core/Components/test/Core.Components.Gis.Test/Data/MapPolygonDataTest.cs =================================================================== diff -u -refe5cc540b802c2307b33eadaa7912e38b9d68a3 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/MapPolygonDataTest.cs (.../MapPolygonDataTest.cs) (revision efe5cc540b802c2307b33eadaa7912e38b9d68a3) +++ Core/Components/test/Core.Components.Gis.Test/Data/MapPolygonDataTest.cs (.../MapPolygonDataTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -80,7 +80,12 @@ public void Constructor_WithStyle_ExpectedValues() { // Setup - var style = new PolygonStyle(Color.Aqua, Color.DarkGoldenrod, 3); + var style = new PolygonStyle + { + FillColor = Color.Aqua, + StrokeColor = Color.DarkGoldenrod, + StrokeThickness = 3 + }; // Call var data = new MapPolygonData("test data", style); Index: Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapLineDataTest.cs =================================================================== diff -u -rbd6c70ad432ca3368d79c8bc2765de16dd0b574a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapLineDataTest.cs (.../MapLineDataTest.cs) (revision bd6c70ad432ca3368d79c8bc2765de16dd0b574a) +++ Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapLineDataTest.cs (.../MapLineDataTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -78,7 +78,12 @@ public void Constructor_WithStyle_ExpectedValues() { // Setup - var style = new LineStyle(Color.Red, 5, DashStyle.Dash); + var style = new LineStyle + { + Color = Color.Red, + Width = 5, + DashStyle = DashStyle.Dash + }; // Call var data = new RemovableMapLineData("test data", style); Index: Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapPointDataTest.cs =================================================================== diff -u -rbd6c70ad432ca3368d79c8bc2765de16dd0b574a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapPointDataTest.cs (.../MapPointDataTest.cs) (revision bd6c70ad432ca3368d79c8bc2765de16dd0b574a) +++ Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapPointDataTest.cs (.../MapPointDataTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -79,7 +79,15 @@ public void Constructor_WithStyle_ExpectedValues() { // Setup - var style = new PointStyle(Color.Aqua, 3, PointSymbol.Circle); + Color color = Color.Aqua; + var style = new PointStyle + { + Color = color, + Size = 3, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }; // Call var data = new RemovableMapPointData("test data", style); Index: Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapPolygonDataTest.cs =================================================================== diff -u -ra325585c183c496773a8b8eae7805289472d6a0c -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapPolygonDataTest.cs (.../MapPolygonDataTest.cs) (revision a325585c183c496773a8b8eae7805289472d6a0c) +++ Core/Components/test/Core.Components.Gis.Test/Data/Removable/MapPolygonDataTest.cs (.../MapPolygonDataTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -77,7 +77,12 @@ public void Constructor_WithStyle_ExpectedValues() { // Setup - var style = new PolygonStyle(Color.Aqua, Color.DarkGoldenrod, 3); + var style = new PolygonStyle + { + FillColor = Color.Aqua, + StrokeColor = Color.DarkGoldenrod, + StrokeThickness = 3 + }; // Call var data = new RemovableMapPolygonData("test data", style); Index: Core/Components/test/Core.Components.Gis.Test/Data/Removable/RemovableMapDataConverterTest.cs =================================================================== diff -u -rbd6c70ad432ca3368d79c8bc2765de16dd0b574a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Data/Removable/RemovableMapDataConverterTest.cs (.../RemovableMapDataConverterTest.cs) (revision bd6c70ad432ca3368d79c8bc2765de16dd0b574a) +++ Core/Components/test/Core.Components.Gis.Test/Data/Removable/RemovableMapDataConverterTest.cs (.../RemovableMapDataConverterTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -40,7 +40,15 @@ // Setup const string name = "test"; var mapFeatures = new MapFeature[0]; - var pointStyle = new PointStyle(Color.AliceBlue, 3, PointSymbol.Diamond); + Color color = Color.AliceBlue; + var pointStyle = new PointStyle + { + Color = color, + Size = 3, + Symbol = PointSymbol.Diamond, + StrokeColor = color, + StrokeThickness = 1 + }; var mapData = new MapPointData(name, pointStyle) { @@ -63,7 +71,12 @@ // Setup const string name = "test"; var mapFeatures = new MapFeature[0]; - var lineStyle = new LineStyle(Color.AliceBlue, 3, DashStyle.Dash); + var lineStyle = new LineStyle + { + Color = Color.AliceBlue, + Width = 3, + DashStyle = DashStyle.Dash + }; var mapData = new MapLineData(name, lineStyle) { @@ -86,7 +99,12 @@ // Setup const string name = "test"; var mapFeatures = new MapFeature[0]; - var polygonStyle = new PolygonStyle(Color.AliceBlue, Color.DeepSkyBlue, 3); + var polygonStyle = new PolygonStyle + { + FillColor = Color.AliceBlue, + StrokeColor = Color.DeepSkyBlue, + StrokeThickness = 3 + }; var mapData = new MapPolygonData(name, polygonStyle) { Index: Core/Components/test/Core.Components.Gis.Test/Style/LineStyleTest.cs =================================================================== diff -u -re8c1804f4a27a708313b7ba2512512b62ad2d3e6 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Style/LineStyleTest.cs (.../LineStyleTest.cs) (revision e8c1804f4a27a708313b7ba2512512b62ad2d3e6) +++ Core/Components/test/Core.Components.Gis.Test/Style/LineStyleTest.cs (.../LineStyleTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -38,7 +38,12 @@ const DashStyle style = DashStyle.Solid; // Call - var lineStyle = new LineStyle(color, width, style); + var lineStyle = new LineStyle + { + Color = color, + Width = width, + DashStyle = style + }; // Assert Assert.AreEqual(color, lineStyle.Color); Index: Core/Components/test/Core.Components.Gis.Test/Style/PointStyleTest.cs =================================================================== diff -u -r9db03162dd78287d02807c92b35d7d967fac9c8a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Style/PointStyleTest.cs (.../PointStyleTest.cs) (revision 9db03162dd78287d02807c92b35d7d967fac9c8a) +++ Core/Components/test/Core.Components.Gis.Test/Style/PointStyleTest.cs (.../PointStyleTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -37,7 +37,14 @@ const PointSymbol style = PointSymbol.Square; // Call - var pointStyle = new PointStyle(color, width, style); + var pointStyle = new PointStyle + { + Color = color, + Size = width, + Symbol = style, + StrokeColor = color, + StrokeThickness = 1 + }; // Assert Assert.AreEqual(color, pointStyle.Color); Index: Core/Components/test/Core.Components.Gis.Test/Style/PolygonStyleTest.cs =================================================================== diff -u -refe5cc540b802c2307b33eadaa7912e38b9d68a3 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Components/test/Core.Components.Gis.Test/Style/PolygonStyleTest.cs (.../PolygonStyleTest.cs) (revision efe5cc540b802c2307b33eadaa7912e38b9d68a3) +++ Core/Components/test/Core.Components.Gis.Test/Style/PolygonStyleTest.cs (.../PolygonStyleTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -37,7 +37,12 @@ const int width = 3; // Call - var polygonStyle = new PolygonStyle(fillColor, strokeColor, width); + var polygonStyle = new PolygonStyle + { + FillColor = fillColor, + StrokeColor = strokeColor, + StrokeThickness = width + }; // Assert Assert.AreEqual(fillColor, polygonStyle.FillColor); Index: Core/Plugins/test/Core.Plugins.Chart.Test/Core.Plugins.Chart.Test.csproj =================================================================== diff -u -r6868bc18ddca842b18abe958296a2129093a3e3b -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Plugins/test/Core.Plugins.Chart.Test/Core.Plugins.Chart.Test.csproj (.../Core.Plugins.Chart.Test.csproj) (revision 6868bc18ddca842b18abe958296a2129093a3e3b) +++ Core/Plugins/test/Core.Plugins.Chart.Test/Core.Plugins.Chart.Test.csproj (.../Core.Plugins.Chart.Test.csproj) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -55,6 +55,7 @@ + Index: Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs =================================================================== diff -u -r1d6e305abb72304f556ba1c2da718de350ca62eb -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs (.../ChartPointDataPropertiesTest.cs) (revision 1d6e305abb72304f556ba1c2da718de350ca62eb) +++ Core/Plugins/test/Core.Plugins.Chart.Test/PropertyClasses/ChartPointDataPropertiesTest.cs (.../ChartPointDataPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -21,6 +21,7 @@ using System.ComponentModel; using System.Drawing; +using System.Drawing.Design; using Core.Common.Base; using Core.Common.Gui.Converters; using Core.Common.TestUtil; Index: Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/FeatureBasedMapDataPropertiesTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/FeatureBasedMapDataPropertiesTest.cs (.../FeatureBasedMapDataPropertiesTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/FeatureBasedMapDataPropertiesTest.cs (.../FeatureBasedMapDataPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -70,7 +70,7 @@ Assert.AreEqual("Test feature based map data", properties.Type); Assert.AreEqual(mapPointData.IsVisible, properties.IsVisible); Assert.AreEqual(mapPointData.ShowLabels, properties.ShowLabels); - Assert.AreEqual(string.Empty, properties.SelectedMetaDataAttribute.MetaDataAttribute); + Assert.IsEmpty(properties.SelectedMetaDataAttribute.MetaDataAttribute); Assert.AreEqual(mapPointData.MetaData, properties.GetAvailableMetaDataAttributes()); } Index: Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapLineDataPropertiesTest.cs =================================================================== diff -u -r5c6072174d8047b062655d56d523d74c5e740039 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapLineDataPropertiesTest.cs (.../MapLineDataPropertiesTest.cs) (revision 5c6072174d8047b062655d56d523d74c5e740039) +++ Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapLineDataPropertiesTest.cs (.../MapLineDataPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -77,24 +77,25 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(8, dynamicProperties.Count); + const string styleCategory = "Stijl"; PropertyDescriptor colorProperty = dynamicProperties[colorPropertyIndex]; Assert.IsInstanceOf(colorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, - "Stijl", + styleCategory, "Kleur", "De kleur van de lijnen waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor widthProperty = dynamicProperties[widthPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(widthProperty, - "Stijl", + styleCategory, "Lijndikte", "De dikte van de lijnen waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor styleProperty = dynamicProperties[stylePropertyIndex]; Assert.IsInstanceOf(styleProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(styleProperty, - "Stijl", + styleCategory, "Lijnstijl", "De stijl van de lijnen waarmee deze kaartlaag wordt weergegeven."); } @@ -107,15 +108,20 @@ const int width = 4; const DashStyle dashStyle = DashStyle.DashDot; - var mapLineData = new MapLineData("Test", new LineStyle(color, width, dashStyle)); + var mapLineData = new MapLineData("Test", new LineStyle + { + Color = color, + Width = width, + DashStyle = dashStyle + }); var properties = new MapLineDataProperties(); // Call properties.Data = mapLineData; // Assert Assert.AreEqual(mapLineData.ShowLabels, properties.ShowLabels); - Assert.AreEqual(string.Empty, properties.SelectedMetaDataAttribute.MetaDataAttribute); + Assert.IsEmpty(properties.SelectedMetaDataAttribute.MetaDataAttribute); Assert.AreEqual(mapLineData.MetaData, properties.GetAvailableMetaDataAttributes()); Assert.AreEqual(color, properties.Color); @@ -133,7 +139,12 @@ observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); mocks.ReplayAll(); - var mapLineData = new MapLineData("Test", new LineStyle(Color.AliceBlue, 3, DashStyle.Solid)); + var mapLineData = new MapLineData("Test", new LineStyle + { + Color = Color.AliceBlue, + Width = 3, + DashStyle = DashStyle.Solid + }); mapLineData.Attach(observerMock); Index: Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPointDataPropertiesTest.cs =================================================================== diff -u -r1d6e305abb72304f556ba1c2da718de350ca62eb -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPointDataPropertiesTest.cs (.../MapPointDataPropertiesTest.cs) (revision 1d6e305abb72304f556ba1c2da718de350ca62eb) +++ Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPointDataPropertiesTest.cs (.../MapPointDataPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -79,37 +79,38 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(10, dynamicProperties.Count); - + const string styleCategory = "Stijl"; + PropertyDescriptor colorProperty = dynamicProperties[colorPropertyIndex]; Assert.IsInstanceOf(colorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, - "Stijl", + styleCategory, "Kleur", "De kleur van de symbolen waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor strokeColorProperty = dynamicProperties[strokeColorPropertyIndex]; Assert.IsInstanceOf(colorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeColorProperty, - "Stijl", + styleCategory, "Lijnkleur", "De kleur van de lijn van de symbolen waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor strokeThicknessProperty = dynamicProperties[strokeThicknessPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(strokeThicknessProperty, - "Stijl", + styleCategory, "Lijndikte", "De dikte van de lijn van de symbolen waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor sizeProperty = dynamicProperties[sizePropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(sizeProperty, - "Stijl", + styleCategory, "Grootte", "De grootte van de symbolen waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor symbolProperty = dynamicProperties[symbolPropertyIndex]; Assert.IsInstanceOf(symbolProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(symbolProperty, - "Stijl", + styleCategory, "Symbool", "Het symbool waarmee deze kaartlaag wordt weergegeven."); } @@ -122,15 +123,22 @@ const int size = 4; const PointSymbol symbol = PointSymbol.Circle; - var mapPointData = new MapPointData("Test", new PointStyle(color, size, symbol)); + var mapPointData = new MapPointData("Test", new PointStyle + { + Color = color, + Size = size, + Symbol = symbol, + StrokeColor = color, + StrokeThickness = 1 + }); var properties = new MapPointDataProperties(); // Call properties.Data = mapPointData; // Assert Assert.AreEqual(mapPointData.ShowLabels, properties.ShowLabels); - Assert.AreEqual(string.Empty, properties.SelectedMetaDataAttribute.MetaDataAttribute); + Assert.IsEmpty(properties.SelectedMetaDataAttribute.MetaDataAttribute); Assert.AreEqual(mapPointData.MetaData, properties.GetAvailableMetaDataAttributes()); Assert.AreEqual(color, properties.Color); @@ -150,7 +158,15 @@ observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); mocks.ReplayAll(); - var mapPointData = new MapPointData("Test", new PointStyle(Color.AliceBlue, 3, PointSymbol.Circle)); + Color color = Color.AliceBlue; + var mapPointData = new MapPointData("Test", new PointStyle + { + Color = color, + Size = 3, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }); mapPointData.Attach(observerMock); Index: Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPolygonDataPropertiesTest.cs =================================================================== diff -u -r5c6072174d8047b062655d56d523d74c5e740039 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPolygonDataPropertiesTest.cs (.../MapPolygonDataPropertiesTest.cs) (revision 5c6072174d8047b062655d56d523d74c5e740039) +++ Core/Plugins/test/Core.Plugins.Map.Test/PropertyClasses/MapPolygonDataPropertiesTest.cs (.../MapPolygonDataPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -76,24 +76,25 @@ // Assert PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties); Assert.AreEqual(8, dynamicProperties.Count); + const string styleCategory = "Stijl"; PropertyDescriptor colorProperty = dynamicProperties[fillColorPropertyIndex]; Assert.IsInstanceOf(colorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(colorProperty, - "Stijl", + styleCategory, "Kleur", "De kleur van de vlakken waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor widthProperty = dynamicProperties[strokeColorPropertyIndex]; Assert.IsInstanceOf(colorProperty.Converter); PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(widthProperty, - "Stijl", + styleCategory, "Lijnkleur", "De kleur van de lijn van de vlakken waarmee deze kaartlaag wordt weergegeven."); PropertyDescriptor styleProperty = dynamicProperties[strokeThicknessPropertyIndex]; PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(styleProperty, - "Stijl", + styleCategory, "Lijndikte", "De dikte van de lijn van de vlakken waarmee deze kaartlaag wordt weergegeven."); } @@ -106,15 +107,20 @@ Color strokeColor = Color.Bisque; const int strokeThickness = 4; - var mapPolygonData = new MapPolygonData("Test", new PolygonStyle(fillColor, strokeColor, strokeThickness)); + var mapPolygonData = new MapPolygonData("Test", new PolygonStyle + { + FillColor = fillColor, + StrokeColor = strokeColor, + StrokeThickness = strokeThickness + }); var properties = new MapPolygonDataProperties(); // Call properties.Data = mapPolygonData; // Assert Assert.AreEqual(mapPolygonData.ShowLabels, properties.ShowLabels); - Assert.AreEqual(string.Empty, properties.SelectedMetaDataAttribute.MetaDataAttribute); + Assert.IsEmpty(properties.SelectedMetaDataAttribute.MetaDataAttribute); Assert.AreEqual(mapPolygonData.MetaData, properties.GetAvailableMetaDataAttributes()); Assert.AreEqual(fillColor, properties.FillColor); @@ -132,7 +138,12 @@ observerMock.Expect(o => o.UpdateObserver()).Repeat.Times(numberOfChangedProperties); mocks.ReplayAll(); - var mapPolygonData = new MapPolygonData("Test", new PolygonStyle(Color.AliceBlue, Color.Blue, 3)); + var mapPolygonData = new MapPolygonData("Test", new PolygonStyle + { + FillColor = Color.AliceBlue, + StrokeColor = Color.Blue, + StrokeThickness = 3 + }); mapPolygonData.Attach(observerMock); Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsMapDataFactory.cs =================================================================== diff -u -r31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsMapDataFactory.cs (.../RingtoetsMapDataFactory.cs) (revision 31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Factories/RingtoetsMapDataFactory.cs (.../RingtoetsMapDataFactory.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -51,7 +51,12 @@ public static MapLineData CreateReferenceLineMapData() { return new MapLineData(RingtoetsCommonDataResources.ReferenceLine_DisplayName, - new LineStyle(Color.Red, thickLineWidth, DashStyle.Solid)) + new LineStyle + { + Color = Color.Red, + Width = thickLineWidth, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = Resources.MetaData_Name }; @@ -63,8 +68,16 @@ /// The created . public static MapPointData CreateHydraulicBoundaryLocationsMapData() { + Color color = Color.DarkBlue; return new MapPointData(RingtoetsCommonDataResources.HydraulicBoundaryConditions_DisplayName, - new PointStyle(Color.DarkBlue, smallPointSize, PointSymbol.Circle)) + new PointStyle + { + Color = color, + Size = smallPointSize, + Symbol = PointSymbol.Circle, + StrokeColor = color, + StrokeThickness = 1 + }) { ShowLabels = true, SelectedMetaDataAttribute = Resources.MetaData_Name @@ -78,7 +91,12 @@ public static MapLineData CreateFailureMechanismSectionsMapData() { return new MapLineData(Resources.FailureMechanism_Sections_DisplayName, - new LineStyle(Color.Khaki, thickLineWidth, DashStyle.Dot)) + new LineStyle + { + Color = Color.Khaki, + Width = thickLineWidth, + DashStyle = DashStyle.Dot + }) { SelectedMetaDataAttribute = Resources.MetaData_Name }; @@ -92,8 +110,16 @@ { string mapDataName = $"{Resources.FailureMechanism_Sections_DisplayName} ({Resources.FailureMechanismSections_StartPoints_DisplayName})"; + Color color = Color.DarkKhaki; return new MapPointData(mapDataName, - new PointStyle(Color.DarkKhaki, largePointSize, PointSymbol.Triangle)); + new PointStyle + { + Color = color, + Size = largePointSize, + Symbol = PointSymbol.Triangle, + StrokeColor = color, + StrokeThickness = 1 + }); } /// @@ -104,8 +130,16 @@ { string mapDataName = $"{Resources.FailureMechanism_Sections_DisplayName} ({Resources.FailureMechanismSections_EndPoints_DisplayName})"; + Color color = Color.DarkKhaki; return new MapPointData(mapDataName, - new PointStyle(Color.DarkKhaki, largePointSize, PointSymbol.Triangle)); + new PointStyle + { + Color = color, + Size = largePointSize, + Symbol = PointSymbol.Triangle, + StrokeColor = color, + StrokeThickness = 1 + }); } /// @@ -115,7 +149,12 @@ public static MapLineData CreateDikeProfileMapData() { return new MapLineData(Resources.DikeProfiles_DisplayName, - new LineStyle(Color.SaddleBrown, thinLineWidth, DashStyle.Solid)) + new LineStyle + { + Color = Color.SaddleBrown, + Width = thinLineWidth, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = Resources.MetaData_Name }; @@ -128,7 +167,12 @@ public static MapLineData CreateForeshoreProfileMapData() { return new MapLineData(Resources.ForeshoreProfiles_DisplayName, - new LineStyle(Color.DarkOrange, thinLineWidth, DashStyle.Solid)) + new LineStyle + { + Color = Color.DarkOrange, + Width = thinLineWidth, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = Resources.MetaData_Name }; @@ -140,8 +184,16 @@ /// The created . public static MapPointData CreateStructuresMapData() { + Color color = Color.DarkSeaGreen; return new MapPointData(Resources.StructuresCollection_DisplayName, - new PointStyle(Color.DarkSeaGreen, largePointSize, PointSymbol.Square)) + new PointStyle + { + Color = color, + Size = largePointSize, + Symbol = PointSymbol.Square, + StrokeColor = color, + StrokeThickness = 1 + }) { SelectedMetaDataAttribute = Resources.MetaData_Name }; @@ -154,7 +206,12 @@ public static MapLineData CreateCalculationsMapData() { return new MapLineData(RingtoetsCommonDataResources.FailureMechanism_Calculations_DisplayName, - new LineStyle(Color.MediumPurple, thinLineWidth, DashStyle.Dash)) + new LineStyle + { + Color = Color.MediumPurple, + Width = thinLineWidth, + DashStyle = DashStyle.Dash + }) { ShowLabels = true, SelectedMetaDataAttribute = Resources.MetaData_Name Index: Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/AssessmentSectionHelperTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/AssessmentSectionHelperTest.cs (.../AssessmentSectionHelperTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Data.TestUtil.Test/AssessmentSectionHelperTest.cs (.../AssessmentSectionHelperTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -51,7 +51,7 @@ Assert.AreEqual(1, hydraulicBoundaryDatabase.Locations.Count); HydraulicBoundaryLocation hydraulicBoundaryLocation = hydraulicBoundaryDatabase.Locations.First(); Assert.AreEqual(1300001, hydraulicBoundaryLocation.Id); - Assert.AreEqual(string.Empty, hydraulicBoundaryLocation.Name); + Assert.IsEmpty(hydraulicBoundaryLocation.Name); Assert.AreEqual(new Point2D(0, 0), hydraulicBoundaryLocation.Location); CollectionAssert.AreEqual(new[] { @@ -82,7 +82,7 @@ Assert.AreEqual(1, hydraulicBoundaryDatabase.Locations.Count); HydraulicBoundaryLocation hydraulicBoundaryLocation = hydraulicBoundaryDatabase.Locations.First(); Assert.AreEqual(1300001, hydraulicBoundaryLocation.Id); - Assert.AreEqual(string.Empty, hydraulicBoundaryLocation.Name); + Assert.IsEmpty(hydraulicBoundaryLocation.Name); Assert.AreEqual(new Point2D(0, 0), hydraulicBoundaryLocation.Location); CollectionAssert.AreEqual(new[] { Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/BreakWaterPropertiesTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/BreakWaterPropertiesTest.cs (.../BreakWaterPropertiesTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/BreakWaterPropertiesTest.cs (.../BreakWaterPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -41,7 +41,7 @@ // Assert Assert.IsInstanceOf>(properties); Assert.IsNull(properties.Data); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreGeometryPropertiesTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreGeometryPropertiesTest.cs (.../ForeshoreGeometryPropertiesTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ForeshoreGeometryPropertiesTest.cs (.../ForeshoreGeometryPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -42,7 +42,7 @@ // Assert Assert.IsInstanceOf>(properties); Assert.IsNull(properties.Data); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -49,7 +49,7 @@ Assert.IsFalse(properties.UseBreakWater); Assert.IsNull(properties.BreakWaterType); Assert.AreEqual(RoundedDouble.NaN, properties.BreakWaterHeight); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] @@ -184,7 +184,7 @@ Assert.IsTrue(properties.UseBreakWater); Assert.AreEqual(BreakWaterType.Caisson, properties.BreakWaterType); Assert.AreEqual(10, properties.BreakWaterHeight, properties.BreakWaterHeight.GetAccuracy()); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); mocks.VerifyAll(); } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs (.../UseForeshorePropertiesTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs (.../UseForeshorePropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -109,7 +109,7 @@ // Assert Assert.IsTrue(properties.UseForeshore); Assert.IsNull(properties.Coordinates); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/SelectionDialogBaseTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/SelectionDialogBaseTest.cs (.../SelectionDialogBaseTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/SelectionDialogBaseTest.cs (.../SelectionDialogBaseTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -94,7 +94,7 @@ Assert.IsFalse(locationCalculateColumn.ReadOnly); var nameColumn = (DataGridViewTextBoxColumn) dataGridView.Columns[nameColumnIndex]; - Assert.AreEqual(string.Empty, nameColumn.HeaderText); + Assert.IsEmpty(nameColumn.HeaderText); Assert.AreEqual("Name", nameColumn.DataPropertyName); Assert.AreEqual(DataGridViewAutoSizeColumnMode.Fill, nameColumn.AutoSizeMode); Assert.IsTrue(nameColumn.ReadOnly); Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLinesMetaReaderTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLinesMetaReaderTest.cs (.../ReferenceLinesMetaReaderTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/ReferenceLines/ReferenceLinesMetaReaderTest.cs (.../ReferenceLinesMetaReaderTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -256,7 +256,7 @@ // Assert Assert.AreEqual(1, referenceLineMetas.Count); ReferenceLineMeta referenceLineMeta = referenceLineMetas.First(); - Assert.AreEqual(string.Empty, referenceLineMeta.AssessmentSectionId); + Assert.IsEmpty(referenceLineMeta.AssessmentSectionId); } private static void AssertReferenceLineMetas(ReferenceLineMeta expectedReferenceLineMeta, ReferenceLineMeta actualReferenceLineMeta) Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/ParameterNameExtractorTest.cs =================================================================== diff -u -rb3b6c13cf736c134476b3db34281332d01ca86b1 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/ParameterNameExtractorTest.cs (.../ParameterNameExtractorTest.cs) (revision b3b6c13cf736c134476b3db34281332d01ca86b1) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/ParameterNameExtractorTest.cs (.../ParameterNameExtractorTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -33,7 +33,7 @@ string result = ParameterNameExtractor.GetFromDisplayName(string.Empty); // Assert - Assert.AreEqual(string.Empty, result); + Assert.IsEmpty(result); } [Test] Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Data.TestUtil.Test/TestDuneLocationTest.cs =================================================================== diff -u -r330f2e86f2fb575c436cdbb46b6d31bc246ef6fc -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Data.TestUtil.Test/TestDuneLocationTest.cs (.../TestDuneLocationTest.cs) (revision 330f2e86f2fb575c436cdbb46b6d31bc246ef6fc) +++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Data.TestUtil.Test/TestDuneLocationTest.cs (.../TestDuneLocationTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -33,7 +33,7 @@ var testLocation = new TestDuneLocation(); // Assert - Assert.AreEqual(string.Empty, testLocation.Name); + Assert.IsEmpty(testLocation.Name); Assert.AreEqual(0, testLocation.Location.X); Assert.AreEqual(0, testLocation.Location.Y); Assert.AreEqual(0, testLocation.Offset.Value); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfileDikeGeometryPropertiesTest.cs =================================================================== diff -u -raeb6e1a439617630e7613b9ed5af152c345fa2c6 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfileDikeGeometryPropertiesTest.cs (.../DikeProfileDikeGeometryPropertiesTest.cs) (revision aeb6e1a439617630e7613b9ed5af152c345fa2c6) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfileDikeGeometryPropertiesTest.cs (.../DikeProfileDikeGeometryPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -46,7 +46,7 @@ // Assert Assert.IsInstanceOf>(properties); Assert.IsNull(properties.Data); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs =================================================================== diff -u -raeb6e1a439617630e7613b9ed5af152c345fa2c6 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs) (revision aeb6e1a439617630e7613b9ed5af152c345fa2c6) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextDikeGeometryPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -57,7 +57,7 @@ // Assert Assert.IsInstanceOf>(properties); Assert.IsNull(properties.Data); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsInputViewTest.cs =================================================================== diff -u -r248d8a19f75dff2b22237c139199914e1047f103 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsInputViewTest.cs (.../GrassCoverErosionInwardsInputViewTest.cs) (revision 248d8a19f75dff2b22237c139199914e1047f103) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsInputViewTest.cs (.../GrassCoverErosionInwardsInputViewTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -123,7 +123,7 @@ // Assert Assert.IsNull(view.Data); Assert.IsNull(view.Chart.Data); - Assert.AreEqual(string.Empty, view.Chart.ChartTitle); + Assert.IsEmpty(view.Chart.ChartTitle); } } Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -92,7 +92,7 @@ Assert.IsNaN(properties.CalculatedReliability); TestHelper.AssertTypeConverter( nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.CalculatedReliability)); - Assert.AreEqual(string.Empty, properties.Convergence); + Assert.IsEmpty(properties.Convergence); } [Test] Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -rfcd32c8e949b4581cc20adcaa7cf7639fcb69d20 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision fcd32c8e949b4581cc20adcaa7cf7639fcb69d20) +++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -92,7 +92,7 @@ Assert.IsNaN(properties.CalculatedReliability); TestHelper.AssertTypeConverter( nameof(GrassCoverErosionOutwardsWaveHeightLocationContextProperties.CalculatedReliability)); - Assert.AreEqual(string.Empty, properties.Convergence); + Assert.IsEmpty(properties.Convergence); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/BackgroundDataPropertiesTest.cs =================================================================== diff -u -r802ea30d1fe8fbae93e58dff9ab054dbabca11ae -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/BackgroundDataPropertiesTest.cs (.../BackgroundDataPropertiesTest.cs) (revision 802ea30d1fe8fbae93e58dff9ab054dbabca11ae) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/BackgroundDataPropertiesTest.cs (.../BackgroundDataPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -87,10 +87,10 @@ // Assert Assert.AreEqual(backgroundData.IsVisible, properties.IsVisible); Assert.AreEqual(backgroundData.Transparency, properties.Transparency); - Assert.AreEqual(string.Empty, properties.Name); - Assert.AreEqual(string.Empty, properties.SourceCapabilitiesUrl); - Assert.AreEqual(string.Empty, properties.SelectedCapabilityIdentifier); - Assert.AreEqual(string.Empty, properties.PreferredFormat); + Assert.IsEmpty(properties.Name); + Assert.IsEmpty(properties.SourceCapabilitiesUrl); + Assert.IsEmpty(properties.SelectedCapabilityIdentifier); + Assert.IsEmpty(properties.PreferredFormat); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs =================================================================== diff -u -r802ea30d1fe8fbae93e58dff9ab054dbabca11ae -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 802ea30d1fe8fbae93e58dff9ab054dbabca11ae) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -95,7 +95,7 @@ Assert.IsNaN(properties.CalculatedReliability); TestHelper.AssertTypeConverter( nameof(DesignWaterLevelLocationContextProperties.CalculatedReliability)); - Assert.AreEqual(string.Empty, properties.Convergence); + Assert.IsEmpty(properties.Convergence); } [Test] Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs =================================================================== diff -u -r802ea30d1fe8fbae93e58dff9ab054dbabca11ae -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 802ea30d1fe8fbae93e58dff9ab054dbabca11ae) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -99,7 +99,7 @@ TestHelper.AssertTypeConverter( nameof(WaveHeightLocationContextProperties.CalculatedReliability)); - Assert.AreEqual(string.Empty, properties.Convergence); + Assert.IsEmpty(properties.Convergence); } [Test] Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFactory.cs =================================================================== diff -u -r31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFactory.cs (.../MacroStabilityInwardsMapDataFactory.cs) (revision 31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/Factories/MacroStabilityInwardsMapDataFactory.cs (.../MacroStabilityInwardsMapDataFactory.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -42,7 +42,12 @@ public static MapLineData CreateSurfaceLinesMapData() { return new MapLineData(DataResources.MacroStabilityInwardsSurfaceLineCollection_TypeDescriptor, - new LineStyle(Color.DarkSeaGreen, 2, DashStyle.Solid)) + new LineStyle + { + Color = Color.DarkSeaGreen, + Width = 2, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = RingtoetsCommonFormsResources.MetaData_Name }; @@ -55,7 +60,12 @@ public static MapLineData CreateStochasticSoilModelsMapData() { return new MapLineData(DataResources.StochasticSoilModelCollection_TypeDescriptor, - new LineStyle(Color.FromArgb(70, Color.SaddleBrown), 5, DashStyle.Solid)) + new LineStyle + { + Color = Color.FromArgb(70, Color.SaddleBrown), + Width = 5, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = RingtoetsCommonFormsResources.MetaData_Name }; Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/RingtoetsMacroStabilityInwardsSurfaceLineTest.cs =================================================================== diff -u -r64349951de884b464e77654a723f26176c9a202c -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/RingtoetsMacroStabilityInwardsSurfaceLineTest.cs (.../RingtoetsMacroStabilityInwardsSurfaceLineTest.cs) (revision 64349951de884b464e77654a723f26176c9a202c) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Data.Test/RingtoetsMacroStabilityInwardsSurfaceLineTest.cs (.../RingtoetsMacroStabilityInwardsSurfaceLineTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -44,7 +44,7 @@ // Assert Assert.IsInstanceOf(surfaceLine); - Assert.AreEqual(string.Empty, surfaceLine.Name); + Assert.IsEmpty(surfaceLine.Name); CollectionAssert.IsEmpty(surfaceLine.Points); Assert.IsNull(surfaceLine.StartingWorldPoint); Assert.IsNull(surfaceLine.EndingWorldPoint); Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsInputViewTest.cs =================================================================== diff -u -rb7ceb01aa02cd6f48334150f867a397314ceba3e -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsInputViewTest.cs (.../MacroStabilityInwardsInputViewTest.cs) (revision b7ceb01aa02cd6f48334150f867a397314ceba3e) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Forms.Test/Views/MacroStabilityInwardsInputViewTest.cs (.../MacroStabilityInwardsInputViewTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -137,7 +137,7 @@ // Assert Assert.IsNull(view.Data); Assert.IsNull(view.Chart.Data); - Assert.AreEqual(string.Empty, view.Chart.ChartTitle); + Assert.IsEmpty(view.Chart.ChartTitle); } } Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs =================================================================== diff -u -r650fc7b43cb6729baee51d079f0377df8d7a3de9 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs (.../MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs) (revision 650fc7b43cb6729baee51d079f0377df8d7a3de9) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Integration.Test/MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs (.../MacroStabilityInwardsFailureMechanismResultViewIntegrationTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -126,15 +126,15 @@ calculation1.NotifyObservers(); Assert.AreEqual(string.Format("1/{0:N0}", 1.0 / calculation1.Probability), dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); - Assert.AreEqual(string.Empty, dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); + Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); // Add another, nested calculation without surface line and ensure the data grid view is updated when the surface line is set var calculation3 = new MacroStabilityInwardsCalculationScenario(new GeneralMacroStabilityInwardsInput()); nestedCalculationGroup.Children.Add(calculation3); nestedCalculationGroup.NotifyObservers(); Assert.AreEqual(string.Format("1/{0:N0}", 1.0 / calculation1.Probability), dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); - Assert.AreEqual(string.Empty, dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); + Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); calculation3.InputParameters.SurfaceLine = assessmentSection.MacroStabilityInwards.SurfaceLines.First( sl => sl.Name == "PK001_0001"); @@ -168,7 +168,7 @@ calculation1.NotifyObservers(); Assert.AreEqual(string.Format("1/{0:N0}", 1.0 / calculation1.Probability), dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); - Assert.AreEqual(string.Empty, dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); + Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); // Clear the output of the calculation and make sure the data grid view is updated MacroStabilityInwardsDataSynchronizationService.ClearCalculationOutput(calculation1); Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Factories/PipingMapDataFactory.cs =================================================================== diff -u -r31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Factories/PipingMapDataFactory.cs (.../PipingMapDataFactory.cs) (revision 31fd11e38313a3c1ee9bb0aa28ce7cdc49f749b2) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Factories/PipingMapDataFactory.cs (.../PipingMapDataFactory.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -42,7 +42,12 @@ public static MapLineData CreateSurfaceLinesMapData() { return new MapLineData(PipingDataResources.PipingSurfaceLineCollection_TypeDescriptor, - new LineStyle(Color.DarkSeaGreen, 2, DashStyle.Solid)) + new LineStyle + { + Color = Color.DarkSeaGreen, + Width = 2, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = RingtoetsCommonFormsResources.MetaData_Name }; @@ -55,7 +60,12 @@ public static MapLineData CreateStochasticSoilModelsMapData() { return new MapLineData(PipingDataResources.StochasticSoilModelCollection_TypeDescriptor, - new LineStyle(Color.FromArgb(70, Color.SaddleBrown), 5, DashStyle.Solid)) + new LineStyle + { + Color = Color.FromArgb(70, Color.SaddleBrown), + Width = 5, + DashStyle = DashStyle.Solid + }) { SelectedMetaDataAttribute = RingtoetsCommonFormsResources.MetaData_Name }; Index: Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/RingtoetsPipingSurfaceLineTest.cs =================================================================== diff -u -r72100b160a77aa268c4cb3aca0124473fc924c70 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/RingtoetsPipingSurfaceLineTest.cs (.../RingtoetsPipingSurfaceLineTest.cs) (revision 72100b160a77aa268c4cb3aca0124473fc924c70) +++ Ringtoets/Piping/test/Ringtoets.Piping.Data.Test/RingtoetsPipingSurfaceLineTest.cs (.../RingtoetsPipingSurfaceLineTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -44,7 +44,7 @@ // Assert Assert.IsInstanceOf(surfaceLine); - Assert.AreEqual(string.Empty, surfaceLine.Name); + Assert.IsEmpty(surfaceLine.Name); CollectionAssert.IsEmpty(surfaceLine.Points); Assert.IsNull(surfaceLine.StartingWorldPoint); Assert.IsNull(surfaceLine.EndingWorldPoint); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingInputViewTest.cs =================================================================== diff -u -rb7ceb01aa02cd6f48334150f867a397314ceba3e -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingInputViewTest.cs (.../PipingInputViewTest.cs) (revision b7ceb01aa02cd6f48334150f867a397314ceba3e) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingInputViewTest.cs (.../PipingInputViewTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -145,7 +145,7 @@ // Assert Assert.IsNull(view.Data); Assert.IsNull(view.Chart.Data); - Assert.AreEqual(string.Empty, view.Chart.ChartTitle); + Assert.IsEmpty(view.Chart.ChartTitle); } } Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/PipingFailureMechanismResultViewIntegrationTest.cs =================================================================== diff -u -r81fa8a9bf3bd503cbd280e88b8f6037a840cff12 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/PipingFailureMechanismResultViewIntegrationTest.cs (.../PipingFailureMechanismResultViewIntegrationTest.cs) (revision 81fa8a9bf3bd503cbd280e88b8f6037a840cff12) +++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/PipingFailureMechanismResultViewIntegrationTest.cs (.../PipingFailureMechanismResultViewIntegrationTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -126,15 +126,15 @@ pipingCalculation1.NotifyObservers(); Assert.AreEqual(string.Format("1/{0:N0}", 1.0 / pipingCalculation1.Probability), dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); - Assert.AreEqual(string.Empty, dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); + Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); // Add another, nested calculation without surface line and ensure the data grid view is updated when the surface line is set var pipingCalculation3 = new PipingCalculationScenario(new GeneralPipingInput()); nestedPipingCalculationGroup.Children.Add(pipingCalculation3); nestedPipingCalculationGroup.NotifyObservers(); Assert.AreEqual(string.Format("1/{0:N0}", 1.0 / pipingCalculation1.Probability), dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); - Assert.AreEqual(string.Empty, dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); + Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); pipingCalculation3.InputParameters.SurfaceLine = assessmentSection.PipingFailureMechanism.SurfaceLines.First( sl => sl.Name == "PK001_0001"); @@ -168,7 +168,7 @@ pipingCalculation1.NotifyObservers(); Assert.AreEqual(string.Format("1/{0:N0}", 1.0 / pipingCalculation1.Probability), dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].FormattedValue); - Assert.AreEqual(string.Empty, dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); + Assert.IsEmpty(dataGridView.Rows[22].Cells[assessmentLayerTwoAIndex].ErrorText); // Clear the output of the calculation and make sure the data grid view is updated PipingDataSynchronizationService.ClearCalculationOutput(pipingCalculation1); Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputForeshoreProfilePropertiesTest.cs =================================================================== diff -u -r0ee0d86b58275264171be7f91afa87b7edd0d67a -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputForeshoreProfilePropertiesTest.cs (.../WaveConditionsInputForeshoreProfilePropertiesTest.cs) (revision 0ee0d86b58275264171be7f91afa87b7edd0d67a) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputForeshoreProfilePropertiesTest.cs (.../WaveConditionsInputForeshoreProfilePropertiesTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -48,7 +48,7 @@ // Assert Assert.IsInstanceOf>(properties); Assert.IsNull(properties.Data); - Assert.AreEqual(string.Empty, properties.ToString()); + Assert.IsEmpty(properties.ToString()); } [Test] Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Views/WaveConditionsInputViewTest.cs =================================================================== diff -u -r4b8ab1201eba50035392ce074fa1cc5da25ff4a7 -r081badaad87a6e2a6d5c861de9ee95fa1ca6dea3 --- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Views/WaveConditionsInputViewTest.cs (.../WaveConditionsInputViewTest.cs) (revision 4b8ab1201eba50035392ce074fa1cc5da25ff4a7) +++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/Views/WaveConditionsInputViewTest.cs (.../WaveConditionsInputViewTest.cs) (revision 081badaad87a6e2a6d5c861de9ee95fa1ca6dea3) @@ -191,7 +191,7 @@ // Assert Assert.IsNull(view.Data); Assert.IsNull(view.Chart.Data); - Assert.AreEqual(string.Empty, view.Chart.ChartTitle); + Assert.IsEmpty(view.Chart.ChartTitle); } }