Index: Core/Common/src/Core.Common.Base/Data/RoundedPoint2DCollection.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/src/Core.Common.Base/Data/RoundedPoint2DCollection.cs (.../RoundedPoint2DCollection.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Core/Common/src/Core.Common.Base/Data/RoundedPoint2DCollection.cs (.../RoundedPoint2DCollection.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -53,7 +53,7 @@ } if (numberOfDecimalPlaces < 0 || numberOfDecimalPlaces > RoundedDouble.MaximumNumberOfDecimalPlaces) { - throw new ArgumentOutOfRangeException("numberOfDecimalPlaces", "Value must be in range [0, 15]."); + throw new ArgumentOutOfRangeException("numberOfDecimalPlaces", @"Value must be in range [0, 15]."); } points = originalPoints.Select(p => Index: Core/Common/src/Core.Common.Base/Geometry/Math2D.cs =================================================================== diff -u -r065af7e201b59ec19a17c42e9d772f5e86b31338 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/src/Core.Common.Base/Geometry/Math2D.cs (.../Math2D.cs) (revision 065af7e201b59ec19a17c42e9d772f5e86b31338) +++ Core/Common/src/Core.Common.Base/Geometry/Math2D.cs (.../Math2D.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -317,7 +317,7 @@ if (double.IsNaN(fraction) || fraction < 0.0 || fraction > 1.0) { - throw new ArgumentOutOfRangeException("fraction", "Fraction needs to be defined in range [0.0, 1.0] in order to reliably interpolate."); + throw new ArgumentOutOfRangeException("fraction", @"Fraction needs to be defined in range [0.0, 1.0] in order to reliably interpolate."); } Vector segmentVector = lineSegment.SecondPoint - lineSegment.FirstPoint; return lineSegment.FirstPoint + segmentVector.Multiply(fraction); Index: Core/Common/src/Core.Common.Utils/EnumDisplayWrapper.cs =================================================================== diff -u -r24da3aa72ccc0776599628c9f971081694048d9a -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/src/Core.Common.Utils/EnumDisplayWrapper.cs (.../EnumDisplayWrapper.cs) (revision 24da3aa72ccc0776599628c9f971081694048d9a) +++ Core/Common/src/Core.Common.Utils/EnumDisplayWrapper.cs (.../EnumDisplayWrapper.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -44,11 +44,11 @@ { if (value == null) { - throw new ArgumentNullException("value", "An Enum type value is required."); + throw new ArgumentNullException("value", @"An Enum type value is required."); } if (!(typeof(Enum).IsAssignableFrom(typeof(T)))) { - throw new InvalidTypeParameterException("T", "The type parameter has to be an Enum type."); + throw new InvalidTypeParameterException("T", @"The type parameter has to be an Enum type."); } Value = value; SetDisplayName(value); Index: Core/Common/test/Core.Common.Base.Test/TypeConverters/RoundedDoubleConverterTest.cs =================================================================== diff -u -r49c5da81f49a23dd6e66526d264a08bf510e6963 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.Base.Test/TypeConverters/RoundedDoubleConverterTest.cs (.../RoundedDoubleConverterTest.cs) (revision 49c5da81f49a23dd6e66526d264a08bf510e6963) +++ Core/Common/test/Core.Common.Base.Test/TypeConverters/RoundedDoubleConverterTest.cs (.../RoundedDoubleConverterTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -164,7 +164,6 @@ RoundedDouble conversionResult = (RoundedDouble) converter.ConvertFrom(context, CultureInfo.CurrentCulture, text); // Assert - Assert.IsNotNull(conversionResult); Assert.AreEqual(RoundedDouble.MaximumNumberOfDecimalPlaces, conversionResult.NumberOfDecimalPlaces); Assert.AreEqual(input, conversionResult.Value); mocks.VerifyAll(); Index: Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs =================================================================== diff -u -r93d214db8ac0a90b6f1bf1712a414e4f31c3eed9 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 93d214db8ac0a90b6f1bf1712a414e4f31c3eed9) +++ Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -1411,7 +1411,7 @@ // Assert Assert.IsTrue(dataGridViewCell.IsInEditMode); - Assert.IsTrue((bool) dataGridViewCell.FormattedValue); + Assert.IsTrue(Convert.ToBoolean(dataGridViewCell.FormattedValue)); } } Index: Core/Common/test/Core.Common.Controls.Test/TextEditor/RichTextBoxControlTest.cs =================================================================== diff -u -r24da3aa72ccc0776599628c9f971081694048d9a -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.Controls.Test/TextEditor/RichTextBoxControlTest.cs (.../RichTextBoxControlTest.cs) (revision 24da3aa72ccc0776599628c9f971081694048d9a) +++ Core/Common/test/Core.Common.Controls.Test/TextEditor/RichTextBoxControlTest.cs (.../RichTextBoxControlTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -173,7 +173,7 @@ }; // Call - richTextBox.Text = "Test"; + richTextBox.Text = @"Test"; // Assert Assert.AreEqual(1, eventCounter); Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs =================================================================== diff -u -rf08fd5cc1482a6c706bdb04d46b6482d489b7c5b -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision f08fd5cc1482a6c706bdb04d46b6482d489b7c5b) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -242,6 +242,7 @@ var defaultProperty = dynamicPropertyBag.GetDefaultProperty(); // Assert + Assert.NotNull(defaultProperty); Assert.AreEqual(dynamicPropertyBag.Properties.First().Name, defaultProperty.Name); } @@ -338,8 +339,8 @@ var propertiesCollection = dynamicPropertyBag.GetProperties(); // Assert - var wrappedValue = propertiesCollection[0].GetValue(dynamicPropertyBag.WrappedObject); - var bag = (DynamicPropertyBag) wrappedValue; + var bag = propertiesCollection[0].GetValue(dynamicPropertyBag.WrappedObject) as DynamicPropertyBag; + Assert.NotNull(bag); Assert.AreSame(subProperties, bag.WrappedObject); } Index: Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs =================================================================== diff -u -r49c5da81f49a23dd6e66526d264a08bf510e6963 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs (.../WindowsFormsTestHelper.cs) (revision 49c5da81f49a23dd6e66526d264a08bf510e6963) +++ Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs (.../WindowsFormsTestHelper.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -34,7 +34,6 @@ { private static string nonModalControlsTestName; // current unit test name private static readonly IList nonModalControls = new List(); - private readonly GuiTestHelper guiTestHelper; private Action
formShown; private bool wasShown; @@ -48,8 +47,6 @@ ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true); InitializeComponent(); - - guiTestHelper = GuiTestHelper.Instance; } public static object[] PropertyObjects { get; set; } Index: Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs =================================================================== diff -u -ra4da6760f40992a5db81766eb5c31e8586bad5ae -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision a4da6760f40992a5db81766eb5c31e8586bad5ae) +++ Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -35,14 +35,12 @@ private static readonly ILog log = LogManager.GetLogger(typeof(WindowsFormsTestHelper)); private static Window window; - private readonly GuiTestHelper guiTestHelper; private Action shownAction; private bool wasShown; public WpfTestHelper() { InitializeComponent(); - guiTestHelper = GuiTestHelper.Instance; } public static void ShowModal(Control control, params object[] propertyObjects) @@ -63,13 +61,13 @@ } } - private void ShowTopLevel(Control control, object[] propertyObjects, bool modal, Action shownAction) + private void ShowTopLevel(Control control, object[] propertyObjects, bool modal, Action onShownAction) { ThrowIfPropertyObjectsContainsActionDueToLikelyMisuse(propertyObjects); GuiTestHelper.Initialize(); - this.shownAction = shownAction; + shownAction = onShownAction; if (control is Window) { Index: Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs =================================================================== diff -u -rf08fd5cc1482a6c706bdb04d46b6482d489b7c5b -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs (.../EnumerableExtensionsTest.cs) (revision f08fd5cc1482a6c706bdb04d46b6482d489b7c5b) +++ Core/Common/test/Core.Common.Utils.Test/Extensions/EnumerableExtensionsTest.cs (.../EnumerableExtensionsTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -37,7 +37,7 @@ IEnumerable enumerable = null; // Call - TestDelegate call = () => enumerable.ForEachElementDo(e => e.GetType()); + TestDelegate call = () => enumerable.ForEachElementDo(e => { }); // Assert string paramName = Assert.Throws(call).ParamName; Index: Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs =================================================================== diff -u -r124e30d6f914a8e154ae8de0827ca363c89bba64 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision 124e30d6f914a8e154ae8de0827ca363c89bba64) +++ Demo/Ringtoets/test/Demo.Ringtoets.Test/Commands/AddNewDemoAssessmentSectionCommandTest.cs (.../AddNewDemoAssessmentSectionCommandTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -395,7 +395,7 @@ private static void AssertExpectedPipingInput(PipingInput inputParameters) { - Console.WriteLine("{0} en {1}", Math.Exp(-0.5), Math.Sqrt((Math.Exp(1) - 1)*Math.Exp(1))); + Console.WriteLine(@"{0} en {1}", Math.Exp(-0.5), Math.Sqrt((Math.Exp(1) - 1)*Math.Exp(1))); Assert.AreEqual(1.0, inputParameters.UpliftModelFactor, 1e-3); Assert.AreEqual(1.0, inputParameters.SellmeijerModelFactor, 1e-3); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenariosViewTest.cs =================================================================== diff -u -r033de4aa9bfa1a67de0bb628427fa75ab96a9184 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenariosViewTest.cs (.../ClosingStructuresScenariosViewTest.cs) (revision 033de4aa9bfa1a67de0bb628427fa75ab96a9184) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresScenariosViewTest.cs (.../ClosingStructuresScenariosViewTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -332,6 +332,7 @@ } else { + Assert.NotNull(expectedComboBoxItemTexts); var dataGridViewColumn = (DataGridViewComboBoxColumn) dataGridView.Columns[1]; Assert.AreEqual(failureMechanism.SectionResults.Count(), rowCount); Index: Ringtoets/Common/src/Ringtoets.Common.Data/Probabilistics/LogNormalDistribution.cs =================================================================== diff -u -r0df7cded06f5afbac08b97e025242ba55c90ec57 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Common/src/Ringtoets.Common.Data/Probabilistics/LogNormalDistribution.cs (.../LogNormalDistribution.cs) (revision 0df7cded06f5afbac08b97e025242ba55c90ec57) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Probabilistics/LogNormalDistribution.cs (.../LogNormalDistribution.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -49,7 +49,7 @@ { // This causes the default initialization set mean to 0, which is invalid. throw new ArgumentOutOfRangeException("numberOfDecimalPlaces", - "Value must be in range [1, 15]."); + @"Value must be in range [1, 15]."); } // Initialize mean, standard deviation and shift of the normal distribution which is the log of the // log-normal distribution with scale parameter mu=0, shape parameter sigma=1 and location parameter theta=0. Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsMapDataFeaturesFactory.cs =================================================================== diff -u -r8dcb8c0fa8992c488bdea7d0631c84b7b1b09e61 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsMapDataFeaturesFactory.cs (.../RingtoetsMapDataFeaturesFactory.cs) (revision 8dcb8c0fa8992c488bdea7d0631c84b7b1b09e61) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/RingtoetsMapDataFeaturesFactory.cs (.../RingtoetsMapDataFeaturesFactory.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -254,7 +254,7 @@ { if (calculationData != null && calculationData.Any()) { - var features = new MapFeature[calculationData.Count()]; + var features = new MapFeature[calculationData.Length]; for (int i = 0; i < calculationData.Length; i++) { Index: Ringtoets/Common/src/Ringtoets.Common.IO/DikeProfiles/ProfileLocationReader.cs =================================================================== diff -u -r4e578730273a943bb02a2861c694a2707c8ef852 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Common/src/Ringtoets.Common.IO/DikeProfiles/ProfileLocationReader.cs (.../ProfileLocationReader.cs) (revision 4e578730273a943bb02a2861c694a2707c8ef852) +++ Ringtoets/Common/src/Ringtoets.Common.IO/DikeProfiles/ProfileLocationReader.cs (.../ProfileLocationReader.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -135,7 +135,7 @@ } catch (CriticalFileReadException e) { - if (e.InnerException.GetType() == typeof(ApplicationException)) + if (e.InnerException != null && e.InnerException.GetType() == typeof(ApplicationException)) { string message = new FileReaderErrorMessageBuilder(shapeFilePath) .Build(Resources.PointShapefileReader_File_can_only_contain_points); Index: Ringtoets/Common/src/Ringtoets.Common.Utils/AssignUnassignCalculations.cs =================================================================== diff -u -r6f46ce9a263e50bca4ff0cb32973f330defd6f3b -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Common/src/Ringtoets.Common.Utils/AssignUnassignCalculations.cs (.../AssignUnassignCalculations.cs) (revision 6f46ce9a263e50bca4ff0cb32973f330defd6f3b) +++ Ringtoets/Common/src/Ringtoets.Common.Utils/AssignUnassignCalculations.cs (.../AssignUnassignCalculations.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -225,7 +225,7 @@ } if (sections.Any(s => s == null)) { - throw new ArgumentException("Sections contains an entry without value.", "sections"); + throw new ArgumentException(@"Sections contains an entry without value.", "sections"); } } @@ -253,7 +253,7 @@ } if (calculations.Any(s => s == null)) { - throw new ArgumentException("Calculations contains an entry without value.", "calculations"); + throw new ArgumentException(@"Calculations contains an entry without value.", "calculations"); } } @@ -265,7 +265,7 @@ } if (sectionResults.Any(s => s == null)) { - throw new ArgumentException("SectionResults contains an entry without value.", "sectionResults"); + throw new ArgumentException(@"SectionResults contains an entry without value.", "sectionResults"); } } Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/NoValueRoundedDoubleConverterTest.cs =================================================================== diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/NoValueRoundedDoubleConverterTest.cs (.../NoValueRoundedDoubleConverterTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/TypeConverters/NoValueRoundedDoubleConverterTest.cs (.../NoValueRoundedDoubleConverterTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -196,7 +196,6 @@ RoundedDouble conversionResult = (RoundedDouble) converter.ConvertFrom(context, CultureInfo.CurrentCulture, text); // Assert - Assert.IsNotNull(conversionResult); Assert.AreEqual(RoundedDouble.MaximumNumberOfDecimalPlaces, conversionResult.NumberOfDecimalPlaces); Assert.AreEqual(input, conversionResult.Value); mocks.VerifyAll(); Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServicesTest.cs =================================================================== diff -u -r87aafc58782eb7ce49b1e06b1db2feda8cd85948 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServicesTest.cs (.../RingtoetsCommonDataSynchronizationServicesTest.cs) (revision 87aafc58782eb7ce49b1e06b1db2feda8cd85948) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/RingtoetsCommonDataSynchronizationServicesTest.cs (.../RingtoetsCommonDataSynchronizationServicesTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -80,7 +80,7 @@ public void ClearHydraulicBoundaryLocationOutput_HydraulicBoundaryDatabaseWithoutLocations_ReturnsNoAffectedObjects() { // Setup - var locations = new ObservableList(); + IEnumerable locations = new ObservableList(); // Call IEnumerable affectedObjects = RingtoetsCommonDataSynchronizationService.ClearHydraulicBoundaryLocationOutput(locations); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsScenariosViewTest.cs =================================================================== diff -u -rc4972d4aec336f991ac1b4ab3dcd56161c238516 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsScenariosViewTest.cs (.../GrassCoverErosionInwardsScenariosViewTest.cs) (revision c4972d4aec336f991ac1b4ab3dcd56161c238516) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsScenariosViewTest.cs (.../GrassCoverErosionInwardsScenariosViewTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -332,6 +332,7 @@ } else { + Assert.NotNull(expectedComboBoxItemTexts); var dataGridViewColumn = (DataGridViewComboBoxColumn) dataGridView.Columns[1]; Assert.AreEqual(failureMechanism.SectionResults.Count(), rowCount); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsScenariosViewIntegrationTest.cs =================================================================== diff -u -rffe405e6b0f8b4d10e6be78cf7735c554eb42a93 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsScenariosViewIntegrationTest.cs (.../GrassCoverErosionInwardsScenariosViewIntegrationTest.cs) (revision ffe405e6b0f8b4d10e6be78cf7735c554eb42a93) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Integration.Test/GrassCoverErosionInwardsScenariosViewIntegrationTest.cs (.../GrassCoverErosionInwardsScenariosViewIntegrationTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows.Forms; @@ -74,7 +75,11 @@ Assert.AreEqual(283, dataGridView.RowCount); var expectedValues = assessmentSection.GrassCoverErosionInwards.SectionResults.Select(sr => sr.Section.Name); - var foundValues = (from DataGridViewRow row in dataGridView.Rows select row.Cells[0].FormattedValue.ToString()).ToList(); + var foundValues = new List(); + foreach (DataGridViewRow row in dataGridView.Rows) + { + foundValues.Add(row.Cells[0].FormattedValue.ToString()); + } CollectionAssert.AreEqual(expectedValues, foundValues); } } Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructureTreeNodeInfoTest.cs =================================================================== diff -u -r01aa3a0cf07a91607a5d4b5e37f2e98c1fc00430 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructureTreeNodeInfoTest.cs (.../HeightStructureTreeNodeInfoTest.cs) (revision 01aa3a0cf07a91607a5d4b5e37f2e98c1fc00430) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/TreeNodeInfos/HeightStructureTreeNodeInfoTest.cs (.../HeightStructureTreeNodeInfoTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -119,7 +119,6 @@ public void CanRemove_ParentIsHeightStructuresContext_ReturnTrue() { // Setup - var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); mocks.ReplayAll(); @@ -132,7 +131,6 @@ // Assert Assert.IsTrue(canRemove); - mocks.VerifyAll(); } [Test] @@ -149,7 +147,6 @@ public void OnNodeRemoved_RemovingProfilePartOfCalculationOfSectionResult_ProfileRemovedFromFailureMechanismAndCalculationProfileClearedAndSectionResultCalculationCleared() { // Setup - var mocks = new MockRepository(); var assessmentSection = mocks.Stub(); var observer = mocks.StrictMock(); observer.Expect(o => o.UpdateObserver()); @@ -234,7 +231,6 @@ Assert.AreSame(calculation2, failureMechanism.SectionResults.ElementAt(0).Calculation); Assert.AreSame(calculation3, failureMechanism.SectionResults.ElementAt(1).Calculation); - mocks.VerifyAll(); } [Test] Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs =================================================================== diff -u -r636633d6507bef2735fd9b712b3a20feb3ac88c4 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs (.../HeightStructuresScenariosViewTest.cs) (revision 636633d6507bef2735fd9b712b3a20feb3ac88c4) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresScenariosViewTest.cs (.../HeightStructuresScenariosViewTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -329,6 +329,7 @@ } else { + Assert.NotNull(expectedComboBoxItemTexts); var dataGridViewColumn = (DataGridViewComboBoxColumn) dataGridView.Columns[1]; Assert.AreEqual(failureMechanism.SectionResults.Count(), rowCount); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs =================================================================== diff -u -rffe405e6b0f8b4d10e6be78cf7735c554eb42a93 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision ffe405e6b0f8b4d10e6be78cf7735c554eb42a93) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Integration.Test/HeightStructuresScenariosViewIntegrationTest.cs (.../HeightStructuresScenariosViewIntegrationTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows.Forms; @@ -75,7 +76,11 @@ Assert.AreEqual(283, dataGridView.RowCount); var expectedValues = assessmentSection.HeightStructures.SectionResults.Select(sr => sr.Section.Name); - var foundValues = (from DataGridViewRow row in dataGridView.Rows select row.Cells[0].FormattedValue.ToString()).ToList(); + var foundValues = new List(); + foreach (DataGridViewRow row in dataGridView.Rows) + { + foundValues.Add(row.Cells[0].FormattedValue.ToString()); + } CollectionAssert.AreEqual(expectedValues, foundValues); } } Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs =================================================================== diff -u -re182f6f394aa75e739467a77e7bcacd9a8b25429 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision e182f6f394aa75e739467a77e7bcacd9a8b25429) +++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/Views/PipingCalculationsView.cs (.../PipingCalculationsView.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -256,7 +256,9 @@ List hydraulicBoundaryLocations = assessmentSection != null && assessmentSection.HydraulicBoundaryDatabase != null ? assessmentSection.HydraulicBoundaryDatabase.Locations : null; - SetItemsOnObjectCollection(hydraulicBoundaryLocationColumn.Items, GetHydraulicBoundaryLocationsDataSource(hydraulicBoundaryLocations).ToArray()); + SetItemsOnObjectCollection( + hydraulicBoundaryLocationColumn.Items, + GetHydraulicBoundaryLocationsDataSource(hydraulicBoundaryLocations).ToArray()); } } Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs =================================================================== diff -u -r4f36e5da39fa486021eefaf352ca05c96dcdab43 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs (.../PipingCalculator.cs) (revision 4f36e5da39fa486021eefaf352ca05c96dcdab43) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs (.../PipingCalculator.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -51,11 +51,11 @@ { if (input == null) { - throw new ArgumentNullException("input", "PipingCalculatorInput required for creating a PipingCalculator."); + throw new ArgumentNullException("input", @"PipingCalculatorInput required for creating a PipingCalculator."); } if (factory == null) { - throw new ArgumentNullException("factory", "IPipingSubCalculatorFactory required for creating a PipingCalculator."); + throw new ArgumentNullException("factory", @"IPipingSubCalculatorFactory required for creating a PipingCalculator."); } this.input = input; this.factory = factory; Index: Ringtoets/Piping/src/Ringtoets.Piping.Primitives/RingtoetsPipingSurfaceLine.cs =================================================================== diff -u -r11f0867b39150ae5fac83dc178a89fee46d27611 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Piping/src/Ringtoets.Piping.Primitives/RingtoetsPipingSurfaceLine.cs (.../RingtoetsPipingSurfaceLine.cs) (revision 11f0867b39150ae5fac83dc178a89fee46d27611) +++ Ringtoets/Piping/src/Ringtoets.Piping.Primitives/RingtoetsPipingSurfaceLine.cs (.../RingtoetsPipingSurfaceLine.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -365,7 +365,7 @@ { if (point == null) { - throw new ArgumentNullException("point", "Cannot find a point in geometry using a null point."); + throw new ArgumentNullException("point", @"Cannot find a point in geometry using a null point."); } return Points.FirstOrDefault(p => p.Equals(point)); } Index: Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingDataSynchronizationService.cs =================================================================== diff -u -re182f6f394aa75e739467a77e7bcacd9a8b25429 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingDataSynchronizationService.cs (.../PipingDataSynchronizationService.cs) (revision e182f6f394aa75e739467a77e7bcacd9a8b25429) +++ Ringtoets/Piping/src/Ringtoets.Piping.Service/PipingDataSynchronizationService.cs (.../PipingDataSynchronizationService.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -154,7 +154,7 @@ } var changedObservables = new List(); - foreach (PipingCalculation pipingCalculationScenario in failureMechanism.Calculations) + foreach (PipingCalculation pipingCalculationScenario in failureMechanism.Calculations.Cast()) { if (ReferenceEquals(pipingCalculationScenario.InputParameters.SurfaceLine, surfaceLine)) { @@ -190,7 +190,7 @@ } var changedObservables = new List(); - foreach (PipingCalculation pipingCalculationScenario in failureMechanism.Calculations) + foreach (PipingCalculation pipingCalculationScenario in failureMechanism.Calculations.Cast()) { if (ReferenceEquals(pipingCalculationScenario.InputParameters.StochasticSoilModel, soilModel)) { Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingScenariosViewTest.cs =================================================================== diff -u -rb190a14336e0d8fe9aec34e81a68194081c76155 -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingScenariosViewTest.cs (.../PipingScenariosViewTest.cs) (revision b190a14336e0d8fe9aec34e81a68194081c76155) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingScenariosViewTest.cs (.../PipingScenariosViewTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; @@ -221,7 +222,7 @@ var cells = rows[0].Cells; Assert.AreEqual(7, cells.Count); - Assert.IsTrue((bool) cells[isRelevantColumnIndex].FormattedValue); + Assert.IsTrue(Convert.ToBoolean(cells[isRelevantColumnIndex].FormattedValue)); Assert.AreEqual(100.ToString(CultureInfo.CurrentCulture), cells[contributionColumnIndex].FormattedValue); Assert.AreEqual("Calculation 1", cells[nameColumnIndex].FormattedValue); Assert.AreEqual("-", cells[failureProbabilityPipingColumnIndex].FormattedValue); @@ -231,7 +232,7 @@ cells = rows[1].Cells; Assert.AreEqual(7, cells.Count); - Assert.IsTrue((bool) cells[isRelevantColumnIndex].FormattedValue); + Assert.IsTrue(Convert.ToBoolean(cells[isRelevantColumnIndex].FormattedValue)); Assert.AreEqual(100.ToString(CultureInfo.CurrentCulture), cells[contributionColumnIndex].FormattedValue); Assert.AreEqual("Calculation 2", cells[nameColumnIndex].FormattedValue); Assert.AreEqual(ProbabilityFormattingHelper.Format(1.5e-3), cells[failureProbabilityPipingColumnIndex].FormattedValue); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresScenariosViewTest.cs =================================================================== diff -u -r7528aa43e1c96e0aba3f0489752adc3e9214774f -re60dbf2fd41434270cad4efba20446e19ede0d2e --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresScenariosViewTest.cs (.../StabilityPointStructuresScenariosViewTest.cs) (revision 7528aa43e1c96e0aba3f0489752adc3e9214774f) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresScenariosViewTest.cs (.../StabilityPointStructuresScenariosViewTest.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) @@ -332,6 +332,7 @@ } else { + Assert.NotNull(expectedComboBoxItemTexts); var dataGridViewColumn = (DataGridViewComboBoxColumn) dataGridView.Columns[1]; Assert.AreEqual(failureMechanism.SectionResults.Count(), rowCount);