Index: Core/Common/src/Core.Common.Utils/Reflection/TypeUtils.cs
===================================================================
diff -u -r39195f5df99368004bfcd61ccee7e0f2575c9b8b -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/src/Core.Common.Utils/Reflection/TypeUtils.cs (.../TypeUtils.cs) (revision 39195f5df99368004bfcd61ccee7e0f2575c9b8b)
+++ Core/Common/src/Core.Common.Utils/Reflection/TypeUtils.cs (.../TypeUtils.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,10 +22,8 @@
using System;
using System.ComponentModel;
using System.Globalization;
-using System.Linq.Expressions;
using System.Reflection;
using Core.Common.Utils.Attributes;
-using Core.Common.Utils.Properties;
namespace Core.Common.Utils.Reflection
{
@@ -89,42 +87,6 @@
}
///
- /// Gets the name of the member.
- ///
- /// The type of the class on which the expression takes place.
- /// The expression.
- /// The string name of the member.
- /// Thrown when
- /// is not an expression with a member, such as an expression calling multiple methods.
- /// Thrown when is null.
- public static string GetMemberName(Expression> expression)
- {
- if (expression == null)
- {
- throw new ArgumentNullException(nameof(expression));
- }
- return GetMemberName(expression, expression.Body);
- }
-
- ///
- /// Gets the name of the member.
- ///
- /// The type of the class on which the expression takes place.
- /// The expression.
- /// The string name of the member.
- /// Thrown when
- /// is not an expression with a member, such as an expression calling multiple methods.
- /// Thrown when is null.
- public static string GetMemberName(Expression> expression)
- {
- if (expression == null)
- {
- throw new ArgumentNullException(nameof(expression));
- }
- return GetMemberName(expression, expression.Body);
- }
-
- ///
/// Gets the value of a field of an instance.
///
/// Type of the field.
@@ -281,94 +243,6 @@
}
///
- /// Determines whether a property is decorated with a
- /// of a given type.
- ///
- /// The type of the target to retrieve the property from.
- /// The type of to check
- /// for on the property of .
- /// The expression that resolves to the property to be checked.
- /// True if the property is decorated with the given ,
- /// false otherwise.
- /// Thrown when is null.
- /// Thrown when
- /// is not an expression with a property, such as an expression calling multiple methods.
- /// Thrown when more than one property is found with
- /// name specified in .
- /// Thrown when a custom attribute type cannot be loaded.
- /// Thrown when the property in
- /// belongs to a type that is loaded into the reflection-only context. See How to:
- /// Load Assemblies into the Reflection-Only Context on MSDN for more information.
- public static bool HasTypeConverter(Expression> expression) where TTypeConverter : TypeConverter
- {
- var typeConverterAttribute = (TypeConverterAttribute) Attribute.GetCustomAttribute(typeof(TTarget).GetProperty(GetMemberName(expression)),
- typeof(TypeConverterAttribute),
- true);
- if (typeConverterAttribute == null)
- {
- return false;
- }
- return typeConverterAttribute.ConverterTypeName == typeof(TTypeConverter).AssemblyQualifiedName;
- }
-
- ///
- /// Gets the name of the member.
- ///
- /// The expression.
- /// The body of the expression.
- /// The string name of the member.
- /// Thrown when the
- /// is not an expression with a member, such as an expression calling multiple methods.
- private static string GetMemberName(Expression originalExpression, Expression expressionBody)
- {
- try
- {
- return GetMemberNameFromExpression(expressionBody);
- }
- catch (NotSupportedException)
- {
- string message = string.Format(CultureInfo.CurrentCulture,
- Resources.TypeUtils_GetMemberName_0_is_not_a_valid_expression_for_this_method,
- originalExpression);
- throw new ArgumentException(message);
- }
- }
-
- ///
- /// Returns the member name from the given .
- ///
- ///
- ///
- /// Thrown when the expression is not any of the following:
- ///
- ///
- ///
- /// - with a of type
- /// or .
- ///
- private static string GetMemberNameFromExpression(Expression expression)
- {
- var member = expression as MemberExpression;
- if (member != null)
- {
- return member.Member.Name;
- }
-
- var method = expression as MethodCallExpression;
- if (method != null)
- {
- return method.Method.Name;
- }
-
- var unary = expression as UnaryExpression;
- if (unary != null)
- {
- return GetMemberNameFromExpression(unary.Operand);
- }
- throw new NotSupportedException();
- }
-
- ///
/// Gets a field (of any visibility specification) declared on the type (as instance
/// or static field).
///
Index: Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Core/Common/test/Core.Common.Controls.Test/DataGrid/DataGridViewControlTest.cs (.../DataGridViewControlTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -490,8 +490,8 @@
propertyName,
headerText,
dataSource,
- TypeUtils.GetMemberName>(ds => ds.Value),
- TypeUtils.GetMemberName>(ds => ds.DisplayName)
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName)
);
// Assert
Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -26,7 +26,6 @@
using Core.Common.Gui.Attributes;
using Core.Common.Gui.PropertyBag;
using Core.Common.TestUtil;
-using Core.Common.Utils.Reflection;
using NUnit.Framework;
using CategoryAttribute = System.ComponentModel.CategoryAttribute;
@@ -263,7 +262,7 @@
});
// When
- string dynamicallyVisiblePropertyName = TypeUtils.GetMemberName(tp => tp.Name);
+ const string dynamicallyVisiblePropertyName = nameof(TestProperties.Name);
PropertyDescriptor namePropertyDescriptor = propertyDescriptorCollection.Find(dynamicallyVisiblePropertyName, false);
// Then
@@ -287,7 +286,7 @@
});
// Call
- string dynamicallyVisiblePropertyName = TypeUtils.GetMemberName(tp => tp.Name);
+ const string dynamicallyVisiblePropertyName = nameof(TestProperties.Name);
PropertyDescriptor namePropertyDescriptor = propertyDescriptorCollection.Find(dynamicallyVisiblePropertyName, false);
// Assert
Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs
===================================================================
diff -u -r7ae9100ff4e61169edcefaeb01b72d492431742f -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs (.../ObjectPropertiesTest.cs) (revision 7ae9100ff4e61169edcefaeb01b72d492431742f)
+++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/ObjectPropertiesTest.cs (.../ObjectPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -63,7 +63,7 @@
// Setup
var properties = new ObjectProperties();
- string dataPropertyName = TypeUtils.GetMemberName>(p => p.Data);
+ const string dataPropertyName = nameof(ObjectProperties.Data);
PropertyInfo propertyInfo = properties.GetType().GetProperty(dataPropertyName);
// Call
Index: Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs
===================================================================
diff -u -r144f482cf3ada5328147669b57cfa593398e194b -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision 144f482cf3ada5328147669b57cfa593398e194b)
+++ Core/Common/test/Core.Common.TestUtil.Test/TestHelperTest.cs (.../TestHelperTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -20,6 +20,7 @@
// All rights reserved.
using System;
+using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Security.AccessControl;
@@ -657,6 +658,46 @@
Assert.AreSame(argumentException, exception);
}
+ [Test]
+ public void HasTypeConverter_PropertyWithoutTypeConverterAttribute_ReturnFalse()
+ {
+ // Call
+ TestDelegate test = () => TestHelper.AssertTypeConverter(nameof(TestClass.PropertyWithoutTypeConverter));
+
+ // Assert
+ Assert.Throws(test);
+ }
+
+ [Test]
+ public void HasTypeConverter_PropertyWithDifferentTypeConverterAttribute_ReturnFalse()
+ {
+ // Call
+ TestDelegate test = () => TestHelper.AssertTypeConverter(nameof(TestClass.PropertyWithTypeConverter));
+
+ // Assert
+ Assert.Throws(test);
+ }
+
+ [Test]
+ public void HasTypeConverter_PropertyWithMatchingTypeConverterAttribute_ReturnTrue()
+ {
+ // Call
+ TestDelegate test = () => TestHelper.AssertTypeConverter(nameof(TestClass.PropertyWithTypeConverter));
+
+ // Assert
+ Assert.DoesNotThrow(test);
+ }
+
+ [Test]
+ public void HasTypeConverter_TypeConverterAttributeInherited_ReturnTrue()
+ {
+ // Call
+ TestDelegate test = () => TestHelper.AssertTypeConverter(nameof(DerivedTestClass.PropertyWithTypeConverter));
+
+ // Assert
+ Assert.DoesNotThrow(test);
+ }
+
private static ToolStripMenuItem CreateContextMenuItem()
{
return new ToolStripMenuItem
@@ -668,5 +709,24 @@
}
private class TestToolStripDropDownItem : ToolStripDropDownItem {}
+
+ private class TestClass
+ {
+ public double PropertyWithoutTypeConverter { get; private set; }
+
+ [TypeConverter(typeof(DoubleConverter))]
+ public virtual double PropertyWithTypeConverter { get; private set; }
+ }
+
+ private class DerivedTestClass : TestClass
+ {
+ public override double PropertyWithTypeConverter
+ {
+ get
+ {
+ return base.PropertyWithTypeConverter;
+ }
+ }
+ }
}
}
\ No newline at end of file
Index: Core/Common/test/Core.Common.TestUtil/TestHelper.cs
===================================================================
diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/test/Core.Common.TestUtil/TestHelper.cs (.../TestHelper.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f)
+++ Core/Common/test/Core.Common.TestUtil/TestHelper.cs (.../TestHelper.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -21,11 +21,13 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
+using System.Reflection;
using System.Windows.Forms;
using log4net.Appender;
using log4net.Config;
@@ -155,7 +157,7 @@
public static string ToUncPath(string rootedPath)
{
string root = Path.GetPathRoot(rootedPath);
- if (string.IsNullOrEmpty(root))
+ if (String.IsNullOrEmpty(root))
{
throw new ArgumentException("Must be a rooted path.", nameof(rootedPath));
}
@@ -316,7 +318,7 @@
}, StringSplitOptions.None).ToList();
customMessageParts.RemoveAt(customMessageParts.Count - 1);
- message = string.Join(Environment.NewLine, customMessageParts.ToArray());
+ message = String.Join(Environment.NewLine, customMessageParts.ToArray());
}
Assert.AreEqual(expectedCustomMessage, message);
return exception;
@@ -359,6 +361,34 @@
}
}
+ ///
+ /// Determines whether a property is decorated with a
+ /// of a given type.
+ ///
+ /// The type of the target to retrieve the property from.
+ /// The type of to check
+ /// for on the property of .
+ /// The expression that resolves to the property to be checked.
+ /// True if the property is decorated with the given ,
+ /// false otherwise.
+ /// Thrown when is null.
+ /// Thrown when
+ /// is not an expression with a property, such as an expression calling multiple methods.
+ /// Thrown when more than one property is found with
+ /// name specified in .
+ /// Thrown when a custom attribute type cannot be loaded.
+ /// Thrown when the property in
+ /// belongs to a type that is loaded into the reflection-only context. See How to:
+ /// Load Assemblies into the Reflection-Only Context on MSDN for more information.
+ public static void AssertTypeConverter(string expression) where TTypeConverter : TypeConverter
+ {
+ var typeConverterAttribute = (TypeConverterAttribute) Attribute.GetCustomAttribute(typeof(TTarget).GetProperty(expression),
+ typeof(TypeConverterAttribute),
+ true);
+ Assert.NotNull(typeConverterAttribute);
+ Assert.IsTrue(typeConverterAttribute.ConverterTypeName == typeof(TTypeConverter).AssemblyQualifiedName);
+ }
+
private static void AssertIsFasterThan(float maxMilliseconds, string message, Action action, bool rankHddAccess)
{
var stopwatch = new Stopwatch();
@@ -382,19 +412,19 @@
rank *= machineHddPerformanceRank;
}
- string userMessage = string.IsNullOrEmpty(message) ? "" : message + ". ";
+ string userMessage = String.IsNullOrEmpty(message) ? "" : message + ". ";
if (!rank.Equals(1.0f))
{
Assert.IsTrue(rank * actualMillisecond < maxMilliseconds, userMessage + "Maximum of {0} milliseconds exceeded. Actual was {1}, machine performance weighted actual was {2}",
maxMilliseconds, actualMillisecond, actualMillisecond * rank);
- Console.WriteLine(userMessage + string.Format("Test took {1} milliseconds (machine performance weighted {2}). Maximum was {0}",
+ Console.WriteLine(userMessage + String.Format("Test took {1} milliseconds (machine performance weighted {2}). Maximum was {0}",
maxMilliseconds, actualMillisecond, actualMillisecond * rank));
}
else
{
Assert.IsTrue(actualMillisecond < maxMilliseconds, userMessage + "Maximum of {0} milliseconds exceeded. Actual was {1}", maxMilliseconds,
actualMillisecond);
- Console.WriteLine(userMessage + string.Format("Test took {1} milliseconds. Maximum was {0}", maxMilliseconds, actualMillisecond));
+ Console.WriteLine(userMessage + String.Format("Test took {1} milliseconds. Maximum was {0}", maxMilliseconds, actualMillisecond));
}
}
@@ -446,7 +476,7 @@
if (!File.Exists(Path.Combine(curDir, solutionName)))
{
- throw new InvalidOperationException(string.Format("Solution file '{0}' not found in any folder of '{1}'.",
+ throw new InvalidOperationException(String.Format("Solution file '{0}' not found in any folder of '{1}'.",
solutionName,
Directory.GetCurrentDirectory()));
}
@@ -457,9 +487,9 @@
private static float GetMachineHddPerformanceRank()
{
string rank = Environment.GetEnvironmentVariable("MACHINE_HDD_PERFORMANCE_RANK");
- if (!string.IsNullOrEmpty(rank))
+ if (!String.IsNullOrEmpty(rank))
{
- return float.Parse(rank);
+ return Single.Parse(rank);
}
return 1.0f;
Index: Core/Common/test/Core.Common.Utils.Test/Reflection/TypeUtilsTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Core/Common/test/Core.Common.Utils.Test/Reflection/TypeUtilsTest.cs (.../TypeUtilsTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Core/Common/test/Core.Common.Utils.Test/Reflection/TypeUtilsTest.cs (.../TypeUtilsTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -150,73 +150,6 @@
}
[Test]
- public void GetMemberName_ExpressionOfFuncIsNull_ThrowsArgumentNullException()
- {
- // Call
- Expression> expression = null;
- TestDelegate call = () => TypeUtils.GetMemberName(expression);
-
- // Assert
- string paramName = Assert.Throws(call).ParamName;
- Assert.AreEqual("expression", paramName);
- }
-
- [Test]
- public void GetMemberName_ExpressionOfActionIsNull_ThrowsArgumentNullException()
- {
- // Call
- Expression> expression = null;
- TestDelegate call = () => TypeUtils.GetMemberName(expression);
-
- // Assert
- string paramName = Assert.Throws(call).ParamName;
- Assert.AreEqual("expression", paramName);
- }
-
- [Test]
- public void GetMemberName_PropertyExpression_ReturnPropertyName()
- {
- // Call
- string memberName = TypeUtils.GetMemberName(t => t.PublicPropertyPrivateSetter);
-
- // Assert
- Assert.AreEqual("PublicPropertyPrivateSetter", memberName);
- }
-
- [Test]
- public void GetMemberName_FieldExpression_ReturnFieldName()
- {
- // Call
- var testClass = new TestClass();
- string memberName = TypeUtils.GetMemberName(t => testClass.PublicField);
-
- // Assert
- Assert.AreEqual("PublicField", memberName);
- }
-
- [Test]
- public void GetMemberName_MethodCallExpression_ReturnMethodName()
- {
- // Call
- var testClass = new TestClass();
- string memberName = TypeUtils.GetMemberName(t => testClass.PublicMethod());
-
- // Assert
- Assert.AreEqual("PublicMethod", memberName);
- }
-
- [Test]
- public void GetMemberName_MethodExpressionOfDifferentType_ThrowArgumentException()
- {
- // Call
- TestDelegate call = () => TypeUtils.GetMemberName(t => new object());
-
- // Assert
- var exception = Assert.Throws(call);
- Assert.AreEqual("'t => new Object()' is geen geldige expressie voor deze methode.", exception.Message);
- }
-
- [Test]
public void GetField_InstanceNull_ThrowArgumentNullException()
{
// Call
@@ -582,46 +515,6 @@
Assert.AreEqual(1.2, testClass.PublicPropertyPrivateSetter);
}
- [Test]
- public void HasTypeConverter_PropertyWithoutTypeConverterAttribute_ReturnFalse()
- {
- // Call
- bool hasTypeConverter = TypeUtils.HasTypeConverter(c => c.PublicPropertyPrivateSetter);
-
- // Assert
- Assert.IsFalse(hasTypeConverter);
- }
-
- [Test]
- public void HasTypeConverter_PropertyWithDifferentTypeConverterAttribute_ReturnFalse()
- {
- // Call
- bool hasTypeConverter = TypeUtils.HasTypeConverter(c => c.PropertyWithTypeConverter);
-
- // Assert
- Assert.IsFalse(hasTypeConverter);
- }
-
- [Test]
- public void HasTypeConverter_PropertyWithMatchingTypeConverterAttribute_ReturnTrue()
- {
- // Call
- bool hasTypeConverter = TypeUtils.HasTypeConverter(c => c.PropertyWithTypeConverter);
-
- // Assert
- Assert.IsTrue(hasTypeConverter);
- }
-
- [Test]
- public void HasTypeConverter_TypeConverterAttributeInherited_ReturnTrue()
- {
- // Call
- bool hasTypeConverter = TypeUtils.HasTypeConverter(c => c.PropertyWithTypeConverter);
-
- // Assert
- Assert.IsTrue(hasTypeConverter);
- }
-
private enum TestEnum
{
NoDisplayName,
@@ -651,14 +544,6 @@
public double PublicPropertyPrivateSetter { get; private set; }
- [TypeConverter(typeof(DoubleConverter))]
- public virtual double PropertyWithTypeConverter { get; private set; }
-
- public object PublicMethod()
- {
- return this;
- }
-
///
/// Method used in reflection for tests above
///
@@ -671,14 +556,6 @@
private class DerivedTestClass : TestClass
{
public DerivedTestClass(int privateInt) : base(privateInt) {}
-
- public override double PropertyWithTypeConverter
- {
- get
- {
- return base.PropertyWithTypeConverter;
- }
- }
}
}
}
\ No newline at end of file
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs
===================================================================
diff -u -rdd8f41ce9d9ff9fd570874721a114560c7a71013 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision dd8f41ce9d9ff9fd570874721a114560c7a71013)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -134,35 +134,35 @@
data.WrappedData.InflowModelType == ClosingStructureInflowModelType.FloodedCulvert ||
data.WrappedData.InflowModelType == ClosingStructureInflowModelType.LowSill)
{
- if (propertyName == TypeUtils.GetMemberName(p => p.InsideWaterLevel))
+ if (propertyName == nameof(InsideWaterLevel))
{
return data.WrappedData.InflowModelType != ClosingStructureInflowModelType.VerticalWall;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.ModelFactorSuperCriticalFlow))
+ if (propertyName == nameof(ModelFactorSuperCriticalFlow))
{
return data.WrappedData.InflowModelType != ClosingStructureInflowModelType.FloodedCulvert;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.DrainCoefficient))
+ if (propertyName == nameof(DrainCoefficient))
{
return data.WrappedData.InflowModelType == ClosingStructureInflowModelType.FloodedCulvert;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.StructureNormalOrientation))
+ if (propertyName == nameof(StructureNormalOrientation))
{
return data.WrappedData.InflowModelType == ClosingStructureInflowModelType.VerticalWall;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.ThresholdHeightOpenWeir))
+ if (propertyName == nameof(ThresholdHeightOpenWeir))
{
return data.WrappedData.InflowModelType == ClosingStructureInflowModelType.LowSill;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.AreaFlowApertures))
+ if (propertyName == nameof(AreaFlowApertures))
{
return data.WrappedData.InflowModelType == ClosingStructureInflowModelType.FloodedCulvert;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.LevelCrestStructureNotClosing))
+ if (propertyName == nameof(LevelCrestStructureNotClosing))
{
return data.WrappedData.InflowModelType == ClosingStructureInflowModelType.VerticalWall;
}
- if (propertyName == TypeUtils.GetMemberName(p => p.WidthFlowApertures))
+ if (propertyName == nameof(WidthFlowApertures))
{
return data.WrappedData.InflowModelType != ClosingStructureInflowModelType.FloodedCulvert;
}
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs
===================================================================
diff -u -rc50d495de60db188ded1147be4d6d64d7ea29a2a -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs (.../ClosingStructuresFailureMechanismResultView.cs) (revision c50d495de60db188ded1147be4d6d64d7ea29a2a)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/Views/ClosingStructuresFailureMechanismResultView.cs (.../ClosingStructuresFailureMechanismResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -104,10 +104,10 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(ClosingStructuresFailureMechanismSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a);
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(ClosingStructuresFailureMechanismSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -rdd8f41ce9d9ff9fd570874721a114560c7a71013 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs (.../ClosingStructuresFailureMechanismSectionResultRowTest.cs) (revision dd8f41ce9d9ff9fd570874721a114560c7a71013)
+++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Forms.Test/Views/ClosingStructuresFailureMechanismSectionResultRowTest.cs (.../ClosingStructuresFailureMechanismSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -20,6 +20,7 @@
// All rights reserved.
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.ClosingStructures.Data;
@@ -49,9 +50,8 @@
// Assert
Assert.IsInstanceOf>(row);
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerTwoA));
+ TestHelper.AssertTypeConverter(
+ nameof(ClosingStructuresFailureMechanismSectionResultRow.AssessmentLayerTwoA));
}
[Test]
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/ScenarioSelectionControl.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/src/Ringtoets.Common.Forms/ScenarioSelectionControl.cs (.../ScenarioSelectionControl.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/ScenarioSelectionControl.cs (.../ScenarioSelectionControl.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -111,16 +111,16 @@
private void AddDataGridColumns()
{
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName>(sr => sr.Name),
+ dataGridViewControl.AddTextBoxColumn(nameof(IScenarioRow.Name),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Section_name,
true);
dataGridViewControl.AddComboBoxColumn>(
- TypeUtils.GetMemberName>(sr => sr.Calculation),
+ nameof(IScenarioRow.Calculation),
RingtoetsCommonDataResources.ICalculation_DisplayName,
null,
- TypeUtils.GetMemberName>(wrapper => wrapper.WrappedObject),
- TypeUtils.GetMemberName>(wrapper => wrapper.DisplayName));
+ nameof(DataGridViewComboBoxItemWrapper.WrappedObject),
+ nameof(DataGridViewComboBoxItemWrapper.DisplayName));
}
private void FillAvailableCalculationsList(DataGridViewRow dataGridViewRow, Dictionary> calculationsPerSegmentName)
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/SelectionDialogBase.cs
===================================================================
diff -u -r72fae487f4d6debd3cec5157de8796827bf27a0c -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/src/Ringtoets.Common.Forms/SelectionDialogBase.cs (.../SelectionDialogBase.cs) (revision 72fae487f4d6debd3cec5157de8796827bf27a0c)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/SelectionDialogBase.cs (.../SelectionDialogBase.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -88,9 +88,9 @@
///
protected void InitializeDataGridView(string nameColumnHeader)
{
- DataGridViewControl.AddCheckBoxColumn(TypeUtils.GetMemberName>(row => row.Selected),
+ DataGridViewControl.AddCheckBoxColumn(nameof(SelectableRow.Selected),
Resources.SelectionDialogBase_ColumnSelect_DisplayName);
- DataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName>(row => row.Name),
+ DataGridViewControl.AddTextBoxColumn(nameof(SelectableRow.Name),
nameColumnHeader, true, DataGridViewAutoSizeColumnMode.Fill);
}
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/StructureEditor.cs
===================================================================
diff -u -rc94cb1b5a316ba340decc1afe0e6be1afb49cde1 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/StructureEditor.cs (.../StructureEditor.cs) (revision c94cb1b5a316ba340decc1afe0e6be1afb49cde1)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/StructureEditor.cs (.../StructureEditor.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -39,7 +39,7 @@
///
public StructureEditor()
{
- DisplayMember = TypeUtils.GetMemberName(s => s.Name);
+ DisplayMember = nameof(StructureBase.Name);
}
protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableView.cs
===================================================================
diff -u -rbdc32ff91af686a45b08e5f4f4a8d5b45eaba60f -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableView.cs (.../CalculatableView.cs) (revision bdc32ff91af686a45b08e5f4f4a8d5b45eaba60f)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableView.cs (.../CalculatableView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -92,7 +92,7 @@
///
protected virtual void InitializeDataGridView()
{
- dataGridViewControl.AddCheckBoxColumn(TypeUtils.GetMemberName>(row => row.ShouldCalculate),
+ dataGridViewControl.AddCheckBoxColumn(nameof(CalculatableRow.ShouldCalculate),
Resources.CalculatableView_Calculate);
}
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs
===================================================================
diff -u -r72fae487f4d6debd3cec5157de8796827bf27a0c -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 72fae487f4d6debd3cec5157de8796827bf27a0c)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/FailureMechanismResultView.cs (.../FailureMechanismResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -173,7 +173,7 @@
protected virtual void AddDataGridColumns()
{
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName>(sr => sr.Name),
+ nameof(FailureMechanismSectionResultRow.Name),
Resources.FailureMechanismResultView_InitializeDataGridView_Section_name,
true);
@@ -184,11 +184,11 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName>(sr => sr.AssessmentLayerOne),
+ nameof(FailureMechanismSectionResultRow.AssessmentLayerOne),
Resources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_one,
oneStateDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
}
private IEnumerable FailureMechanismSectionResult
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -63,11 +63,11 @@
protected override void InitializeDataGridView()
{
base.InitializeDataGridView();
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Name),
+ dataGridViewControl.AddTextBoxColumn(nameof(HydraulicBoundaryLocationRow.Name),
RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Location_Name_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Id),
+ dataGridViewControl.AddTextBoxColumn(nameof(HydraulicBoundaryLocationRow.Id),
RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Location_Id_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Location),
+ dataGridViewControl.AddTextBoxColumn(nameof(HydraulicBoundaryLocationRow.Location),
RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Location_Coordinates_DisplayName);
}
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/DesignWaterLevelLocationRowTest.cs
===================================================================
diff -u -r888f6cdc81e8fb6d6a5b9baadf6395f209008836 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/DesignWaterLevelLocationRowTest.cs (.../DesignWaterLevelLocationRowTest.cs) (revision 888f6cdc81e8fb6d6a5b9baadf6395f209008836)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/DesignWaterLevelLocationRowTest.cs (.../DesignWaterLevelLocationRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -19,6 +19,7 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics;
@@ -50,8 +51,8 @@
Assert.AreEqual(hydraulicBoundaryLocation.Location, row.Location);
Assert.AreSame(hydraulicBoundaryLocation, row.CalculatableObject);
Assert.IsFalse(row.ShouldCalculate);
- Assert.IsTrue(TypeUtils.HasTypeConverter(r => r.DesignWaterLevel));
+ TestHelper.AssertTypeConverter(
+ nameof(DesignWaterLevelLocationRow.DesignWaterLevel));
}
[Test]
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismSectionResultRowTest.cs (.../FailureMechanismSectionResultRowTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/FailureMechanismSectionResultRowTest.cs (.../FailureMechanismSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -23,6 +23,7 @@
using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Rhino.Mocks;
@@ -61,9 +62,9 @@
Assert.AreEqual(section.Name, row.Name);
Assert.AreEqual(result.AssessmentLayerOne, row.AssessmentLayerOne);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ nameof(TestFailureMechanismSectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/WaveHeightLocationRowTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/WaveHeightLocationRowTest.cs (.../WaveHeightLocationRowTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Views/WaveHeightLocationRowTest.cs (.../WaveHeightLocationRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -21,6 +21,7 @@
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics;
@@ -59,8 +60,8 @@
Assert.AreEqual(expectedPoint2D, row.Location);
Assert.AreSame(hydraulicBoundaryLocation, row.CalculatableObject);
Assert.IsFalse(row.ShouldCalculate);
- Assert.IsTrue(TypeUtils.HasTypeConverter(r => r.WaveHeight));
+ TestHelper.AssertTypeConverter(
+ nameof(WaveHeightLocationRow.WaveHeight));
}
[Test]
Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneErosionFailureMechanismResultView.cs
===================================================================
diff -u -r17803ed039cce7b596f325b6bdd03628ff333c03 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneErosionFailureMechanismResultView.cs (.../DuneErosionFailureMechanismResultView.cs) (revision 17803ed039cce7b596f325b6bdd03628ff333c03)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneErosionFailureMechanismResultView.cs (.../DuneErosionFailureMechanismResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -67,13 +67,13 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(DuneErosionSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
twoAResultDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(DuneErosionSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationsView.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationsView.cs (.../DuneLocationsView.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationsView.cs (.../DuneLocationsView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -121,23 +121,23 @@
protected override void InitializeDataGridView()
{
base.InitializeDataGridView();
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Name),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.Name),
RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Location_Name_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Id),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.Id),
RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Location_Id_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Location),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.Location),
RingtoetsCommonFormsResources.HydraulicBoundaryDatabase_Location_Coordinates_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.CoastalAreaId),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.CoastalAreaId),
Resources.DuneLocation_CoastalAreaId_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.Offset),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.Offset),
Resources.DuneLocation_Offset_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.WaterLevel),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.WaterLevel),
Resources.DuneLocation_WaterLevel_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.WaveHeight),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.WaveHeight),
Resources.DuneLocation_WaveHeight_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.WavePeriod),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.WavePeriod),
Resources.DuneLocation_WavePeriod_DisplayName);
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.D50),
+ dataGridViewControl.AddTextBoxColumn(nameof(DuneLocationRow.D50),
Resources.DuneLocation_D50_DisplayName);
}
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationContextPropertiesTest.cs
===================================================================
diff -u -ra25d8e273425a90e4a8fa870f5fb624f7684ef20 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationContextPropertiesTest.cs (.../DuneLocationContextPropertiesTest.cs) (revision a25d8e273425a90e4a8fa870f5fb624f7684ef20)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationContextPropertiesTest.cs (.../DuneLocationContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -86,18 +86,18 @@
Assert.IsNaN(properties.WavePeriod);
Assert.IsNaN(properties.TargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.TargetProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationContextProperties.TargetProbability));
Assert.IsNaN(properties.TargetReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.TargetReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationContextProperties.TargetReliability));
Assert.IsNaN(properties.CalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.CalculatedProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationContextProperties.CalculatedProbability));
Assert.IsNaN(properties.CalculatedReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.CalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationContextProperties.CalculatedReliability));
string convergenceValue = new EnumDisplayWrapper(CalculationConvergence.NotCalculated).DisplayName;
Assert.AreEqual(convergenceValue, properties.Convergence);
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationsContextPropertiesTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationsContextPropertiesTest.cs (.../DuneLocationsContextPropertiesTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/PropertyClasses/DuneLocationsContextPropertiesTest.cs (.../DuneLocationsContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -61,8 +61,8 @@
// Assert
CollectionAssert.AllItemsAreInstancesOfType(properties.Locations, typeof(DuneLocationContextProperties));
Assert.AreEqual(1, properties.Locations.Length);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.Locations));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationsContextProperties.Locations));
DuneLocationContextProperties duneLocationContextProperties = properties.Locations.First();
Assert.AreEqual(location.Id, duneLocationContextProperties.Id);
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Views/DuneErosionSectionResultRowTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Views/DuneErosionSectionResultRowTest.cs (.../DuneErosionSectionResultRowTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Views/DuneErosionSectionResultRowTest.cs (.../DuneErosionSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,9 +65,8 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneErosionSectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Views/DuneLocationRowTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Views/DuneLocationRowTest.cs (.../DuneLocationRowTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/DuneErosion/test/Ringtoets.DuneErosion.Forms.Test/Views/DuneLocationRowTest.cs (.../DuneLocationRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -21,6 +21,7 @@
using System.Globalization;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics;
@@ -71,12 +72,12 @@
Assert.AreEqual(location.Output.WaveHeight, row.WaveHeight);
Assert.AreEqual(location.Output.WavePeriod, row.WavePeriod);
- Assert.IsTrue(TypeUtils.HasTypeConverter(r => r.WaterLevel));
- Assert.IsTrue(TypeUtils.HasTypeConverter(r => r.WaveHeight));
- Assert.IsTrue(TypeUtils.HasTypeConverter(r => r.WavePeriod));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationRow.WaterLevel));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationRow.WaveHeight));
+ TestHelper.AssertTypeConverter(
+ nameof(DuneLocationRow.WavePeriod));
}
[Test]
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/UITypeEditors/GrassCoverErosionInwardsInputContextDikeProfileEditor.cs
===================================================================
diff -u -rc94cb1b5a316ba340decc1afe0e6be1afb49cde1 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/UITypeEditors/GrassCoverErosionInwardsInputContextDikeProfileEditor.cs (.../GrassCoverErosionInwardsInputContextDikeProfileEditor.cs) (revision c94cb1b5a316ba340decc1afe0e6be1afb49cde1)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/UITypeEditors/GrassCoverErosionInwardsInputContextDikeProfileEditor.cs (.../GrassCoverErosionInwardsInputContextDikeProfileEditor.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -40,7 +40,7 @@
///
public GrassCoverErosionInwardsInputContextDikeProfileEditor()
{
- DisplayMember = TypeUtils.GetMemberName(dp => dp.Name);
+ DisplayMember = nameof(DikeProfile.Name);
}
protected override IEnumerable GetAvailableOptions(ITypeDescriptorContext context)
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs
===================================================================
diff -u -rc50d495de60db188ded1147be4d6d64d7ea29a2a -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs (.../GrassCoverErosionInwardsFailureMechanismResultView.cs) (revision c50d495de60db188ded1147be4d6d64d7ea29a2a)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/Views/GrassCoverErosionInwardsFailureMechanismResultView.cs (.../GrassCoverErosionInwardsFailureMechanismResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -104,11 +104,11 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(GrassCoverErosionInwardsFailureMechanismSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
true);
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(GrassCoverErosionInwardsFailureMechanismSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs
===================================================================
diff -u -r6afbb616ce84cccaf56617d60c5cd821b00daab0 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 6afbb616ce84cccaf56617d60c5cd821b00daab0)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -166,11 +166,11 @@
Assert.AreEqual(input.CriticalFlowRate.StandardDeviation, properties.CriticalFlowRate.StandardDeviation);
Assert.IsNull(properties.SelectedHydraulicBoundaryLocation);
Assert.AreEqual(input.DikeHeightCalculationType, properties.DikeHeightCalculationType);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DikeHeightCalculationType));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsInputContextProperties.DikeHeightCalculationType));
Assert.AreEqual(input.OvertoppingRateCalculationType, properties.OvertoppingRateCalculationType);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.OvertoppingRateCalculationType));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsInputContextProperties.OvertoppingRateCalculationType));
Assert.IsNull(properties.WorldReferencePoint);
mockRepository.VerifyAll();
}
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs
===================================================================
diff -u -r4fdff34866efa13e88e933612e3aefb035f1c6a2 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (.../GrassCoverErosionInwardsOutputPropertiesTest.cs) (revision 4fdff34866efa13e88e933612e3aefb035f1c6a2)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsOutputPropertiesTest.cs (.../GrassCoverErosionInwardsOutputPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -127,35 +127,35 @@
Assert.AreEqual(2, properties.DikeHeight.NumberOfDecimalPlaces);
Assert.AreEqual(dikeHeight, properties.DikeHeight, properties.DikeHeight.GetAccuracy());
Assert.AreEqual(dikeHeightTargetProbability, properties.DikeHeightTargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DikeHeightTargetProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.DikeHeightTargetProbability));
Assert.AreEqual(dikeHeightTargetReliability, properties.DikeHeightTargetReliability, properties.DikeHeightTargetReliability.GetAccuracy());
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DikeHeightTargetReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.DikeHeightTargetReliability));
Assert.AreEqual(dikeHeightCalculatedProbability, properties.DikeHeightCalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DikeHeightCalculatedProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.DikeHeightCalculatedProbability));
Assert.AreEqual(dikeHeightCalculatedReliability, properties.DikeHeightCalculatedReliability, properties.DikeHeightCalculatedReliability.GetAccuracy());
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DikeHeightCalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.DikeHeightCalculatedReliability));
string dikeHeightConvergenceValue = new EnumDisplayWrapper(dikeHeightConvergence).DisplayName;
Assert.AreEqual(dikeHeightConvergenceValue, properties.DikeHeightConvergence);
Assert.AreEqual(2, properties.OvertoppingRate.NumberOfDecimalPlaces);
Assert.AreEqual(overtoppingRate * 1000, properties.OvertoppingRate, properties.OvertoppingRate.GetAccuracy());
Assert.AreEqual(overtoppingRateTargetProbability, properties.OvertoppingRateTargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.OvertoppingRateTargetProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.OvertoppingRateTargetProbability));
Assert.AreEqual(overtoppingRateTargetReliability, properties.OvertoppingRateTargetReliability, properties.OvertoppingRateTargetReliability.GetAccuracy());
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.OvertoppingRateTargetReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.OvertoppingRateTargetReliability));
Assert.AreEqual(overtoppingRateCalculatedProbability, properties.OvertoppingRateCalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.OvertoppingRateCalculatedProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.OvertoppingRateCalculatedProbability));
Assert.AreEqual(overtoppingRateCalculatedReliability, properties.OvertoppingRateCalculatedReliability, properties.OvertoppingRateCalculatedReliability.GetAccuracy());
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.OvertoppingRateCalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsOutputProperties.OvertoppingRateCalculatedReliability));
string overtoppingRateConvergenceValue = new EnumDisplayWrapper(overtoppingRateConvergence).DisplayName;
Assert.AreEqual(overtoppingRateConvergenceValue, properties.OvertoppingRateConvergence);
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -r62492ce3e891365124204d4b570917c4ee298a41 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision 62492ce3e891365124204d4b570917c4ee298a41)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs (.../GrassCoverErosionInwardsFailureMechanismSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -20,7 +20,7 @@
// All rights reserved.
using Core.Common.Base.Geometry;
-using Core.Common.Utils.Reflection;
+using Core.Common.TestUtil;
using NUnit.Framework;
using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.FailureMechanism;
@@ -49,9 +49,8 @@
// Assert
Assert.IsInstanceOf>(row);
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerTwoA));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionInwardsFailureMechanismSectionResultRow.AssessmentLayerTwoA));
}
[Test]
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs
===================================================================
diff -u -rb15268001c06a569fb2f63e9615ac86ebf3fc7c5 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs) (revision b15268001c06a569fb2f63e9615ac86ebf3fc7c5)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -108,7 +108,7 @@
protected override void InitializeDataGridView()
{
base.InitializeDataGridView();
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.DesignWaterLevel),
+ dataGridViewControl.AddTextBoxColumn(nameof(DesignWaterLevelLocationRow.DesignWaterLevel),
Resources.GrassCoverErosionOutwardsHydraulicBoundaryLocation_DesignWaterLevel_DisplayName);
}
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismResultView.cs (.../GrassCoverErosionOutwardsFailureMechanismResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsFailureMechanismResultView.cs (.../GrassCoverErosionOutwardsFailureMechanismResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -67,13 +67,13 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(GrassCoverErosionOutwardsFailureMechanismSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
twoAResultDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(GrassCoverErosionOutwardsFailureMechanismSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs
===================================================================
diff -u -rb15268001c06a569fb2f63e9615ac86ebf3fc7c5 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsView.cs) (revision b15268001c06a569fb2f63e9615ac86ebf3fc7c5)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/Views/GrassCoverErosionOutwardsWaveHeightLocationsView.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -140,7 +140,7 @@
protected override void InitializeDataGridView()
{
base.InitializeDataGridView();
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.WaveHeight),
+ dataGridViewControl.AddTextBoxColumn(nameof(WaveHeightLocationRow.WaveHeight),
Resources.GrassCoverErosionOutwardsHydraulicBoundaryLocation_WaveHeight_DisplayName);
}
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs
===================================================================
diff -u -rb15268001c06a569fb2f63e9615ac86ebf3fc7c5 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision b15268001c06a569fb2f63e9615ac86ebf3fc7c5)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -79,22 +79,20 @@
Assert.AreEqual(hydraulicBoundaryLocation.Name, properties.Name);
Assert.AreEqual(hydraulicBoundaryLocation.Location, properties.Location);
Assert.IsNaN(properties.DesignWaterLevel);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DesignWaterLevel));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.DesignWaterLevel));
Assert.AreEqual(double.NaN, properties.TargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.TargetProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.TargetProbability));
Assert.IsNaN(properties.TargetReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.TargetReliability));
+ TestHelper.AssertTypeConverter
+ (nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.TargetReliability));
Assert.AreEqual(double.NaN, properties.CalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.CalculatedProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.CalculatedProbability));
Assert.IsNaN(properties.CalculatedReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.CalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties.CalculatedReliability));
Assert.AreEqual(string.Empty, properties.Convergence);
}
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertiesTest.cs
===================================================================
diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertiesTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertiesTest.cs (.../GrassCoverErosionOutwardsDesignWaterLevelLocationsContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -24,6 +24,7 @@
using Core.Common.Base;
using Core.Common.Gui.Converters;
using Core.Common.Gui.PropertyBag;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics;
@@ -94,8 +95,8 @@
// Assert
Assert.AreEqual(1, properties.Locations.Length);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.Locations));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsDesignWaterLevelLocationsContextProperties.Locations));
GrassCoverErosionOutwardsDesignWaterLevelLocationContextProperties locationProperties = properties.Locations[0];
Assert.AreEqual(location.Name, locationProperties.Name);
Assert.AreEqual(location.Id, locationProperties.Id);
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs
===================================================================
diff -u -rb15268001c06a569fb2f63e9615ac86ebf3fc7c5 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision b15268001c06a569fb2f63e9615ac86ebf3fc7c5)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -79,22 +79,20 @@
Assert.AreEqual(hydraulicBoundaryLocation.Name, properties.Name);
Assert.AreEqual(hydraulicBoundaryLocation.Location, properties.Location);
Assert.IsNaN(properties.WaveHeight);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.WaveHeight));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsWaveHeightLocationContextProperties.WaveHeight));
Assert.AreEqual(double.NaN, properties.TargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.TargetProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsWaveHeightLocationContextProperties.TargetProbability));
Assert.IsNaN(properties.TargetReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.TargetReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsWaveHeightLocationContextProperties.TargetReliability));
Assert.AreEqual(double.NaN, properties.CalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.CalculatedProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsWaveHeightLocationContextProperties.CalculatedProbability));
Assert.IsNaN(properties.CalculatedReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.CalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsWaveHeightLocationContextProperties.CalculatedReliability));
Assert.AreEqual(string.Empty, properties.Convergence);
}
Index: Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationsContextPropertiesTest.cs
===================================================================
diff -u -r545b105a213ed85564861b4bcf6d2d6425dbde50 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationsContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsContextPropertiesTest.cs) (revision 545b105a213ed85564861b4bcf6d2d6425dbde50)
+++ Ringtoets/GrassCoverErosionOutwards/test/Ringtoets.GrassCoverErosionOutwards.Forms.Test/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationsContextPropertiesTest.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -25,6 +25,7 @@
using Core.Common.Base;
using Core.Common.Gui.Converters;
using Core.Common.Gui.PropertyBag;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.Hydraulics;
@@ -94,8 +95,8 @@
// Assert
Assert.AreEqual(1, properties.Locations.Length);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.Locations));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverErosionOutwardsWaveHeightLocationsContextProperties.Locations));
GrassCoverErosionOutwardsWaveHeightLocationContextProperties locationProperties = properties.Locations.First();
Assert.AreEqual(location.Name, locationProperties.Name);
Assert.AreEqual(location.Id, locationProperties.Id);
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismResultView.cs
===================================================================
diff -u -rc50d495de60db188ded1147be4d6d64d7ea29a2a -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismResultView.cs (.../HeightStructuresFailureMechanismResultView.cs) (revision c50d495de60db188ded1147be4d6d64d7ea29a2a)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/Views/HeightStructuresFailureMechanismResultView.cs (.../HeightStructuresFailureMechanismResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -104,11 +104,11 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(HeightStructuresFailureMechanismSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
true);
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(HeightStructuresFailureMechanismSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs
===================================================================
diff -u -rdd8f41ce9d9ff9fd570874721a114560c7a71013 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision dd8f41ce9d9ff9fd570874721a114560c7a71013)
+++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Forms.Test/Views/HeightStructuresFailureMechanismSectionResultRowTest.cs (.../HeightStructuresFailureMechanismSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -20,6 +20,7 @@
// All rights reserved.
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.Calculation;
@@ -49,9 +50,8 @@
// Assert
Assert.IsInstanceOf>(row);
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerTwoA));
+ TestHelper.AssertTypeConverter(
+ nameof(HeightStructuresFailureMechanismSectionResultRow.AssessmentLayerTwoA));
}
[Test]
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/DesignWaterLevelLocationsView.cs (.../DesignWaterLevelLocationsView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -104,7 +104,7 @@
protected override void InitializeDataGridView()
{
base.InitializeDataGridView();
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.DesignWaterLevel),
+ dataGridViewControl.AddTextBoxColumn(nameof(DesignWaterLevelLocationRow.DesignWaterLevel),
Resources.HydraulicBoundaryDatabase_Location_DesignWaterLevel_DisplayName);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionView.cs
===================================================================
diff -u -r72fae487f4d6debd3cec5157de8796827bf27a0c -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionView.cs (.../FailureMechanismContributionView.cs) (revision 72fae487f4d6debd3cec5157de8796827bf27a0c)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/FailureMechanismContributionView.cs (.../FailureMechanismContributionView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -229,22 +229,22 @@
private void InitializeGridColumns()
{
- probabilityDistributionGrid.AddCheckBoxColumn(TypeUtils.GetMemberName(fmci => fmci.IsRelevant),
+ probabilityDistributionGrid.AddCheckBoxColumn(nameof(FailureMechanismContributionItemRow.IsRelevant),
CommonGuiResources.FailureMechanismContributionView_GridColumn_RelevancyFilter);
- probabilityDistributionGrid.AddTextBoxColumn(TypeUtils.GetMemberName(fmci => fmci.Assessment),
+ probabilityDistributionGrid.AddTextBoxColumn(nameof(FailureMechanismContributionItemRow.Assessment),
CommonGuiResources.FailureMechanismContributionView_GridColumn_Assessment,
true);
- probabilityDistributionGrid.AddTextBoxColumn(TypeUtils.GetMemberName(fmci => fmci.Code),
+ probabilityDistributionGrid.AddTextBoxColumn(nameof(FailureMechanismContributionItemRow.Code),
CommonGuiResources.FailureMechanismContributionView_GridColumn_AssessmentCode,
true);
- probabilityDistributionGrid.AddTextBoxColumn(TypeUtils.GetMemberName(fmci => fmci.Contribution),
+ probabilityDistributionGrid.AddTextBoxColumn(nameof(FailureMechanismContributionItemRow.Contribution),
CommonGuiResources.FailureMechanismContributionView_GridColumn_Contribution,
true);
- probabilityDistributionGrid.AddTextBoxColumn(TypeUtils.GetMemberName(fmci => fmci.ProbabilitySpace),
+ probabilityDistributionGrid.AddTextBoxColumn(nameof(FailureMechanismContributionItemRow.ProbabilitySpace),
CommonGuiResources.FailureMechanismContributionView_GridColumn_ProbabilitySpace,
true,
DataGridViewAutoSizeColumnMode.Fill,
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffInwardsResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffInwardsResultView.cs (.../GrassCoverSlipOffInwardsResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffInwardsResultView.cs (.../GrassCoverSlipOffInwardsResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -68,13 +68,13 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(GrassCoverSlipOffInwardsSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
twoAResultDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(GrassCoverSlipOffInwardsSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultView.cs (.../GrassCoverSlipOffOutwardsResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultView.cs (.../GrassCoverSlipOffOutwardsResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -68,13 +68,13 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(GrassCoverSlipOffOutwardsSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
twoAResultDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(GrassCoverSlipOffOutwardsSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityInwardsResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityInwardsResultView.cs (.../MacrostabilityInwardsResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityInwardsResultView.cs (.../MacrostabilityInwardsResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -58,10 +58,10 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(MacrostabilityInwardsSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a);
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(MacrostabilityInwardsSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityOutwardsResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityOutwardsResultView.cs (.../MacrostabilityOutwardsResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MacrostabilityOutwardsResultView.cs (.../MacrostabilityOutwardsResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -58,10 +58,10 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(MacrostabilityOutwardsSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a);
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(MacrostabilityOutwardsSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MicrostabilityResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MicrostabilityResultView.cs (.../MicrostabilityResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/MicrostabilityResultView.cs (.../MicrostabilityResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -68,13 +68,13 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(MicrostabilitySectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
twoAResultDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(MicrostabilitySectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/PipingStructureResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/PipingStructureResultView.cs (.../PipingStructureResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/PipingStructureResultView.cs (.../PipingStructureResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -68,13 +68,13 @@
.ToArray();
DataGridViewControl.AddComboBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerTwoA),
+ nameof(PipingStructureSectionResultRow.AssessmentLayerTwoA),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_two_a,
twoAResultDataSource,
- TypeUtils.GetMemberName>(edw => edw.Value),
- TypeUtils.GetMemberName>(edw => edw.DisplayName));
+ nameof(EnumDisplayWrapper.Value),
+ nameof(EnumDisplayWrapper.DisplayName));
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(PipingStructureSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultView.cs (.../StrengthStabilityLengthwiseConstructionResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/StrengthStabilityLengthwiseConstructionResultView.cs (.../StrengthStabilityLengthwiseConstructionResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -58,7 +58,7 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(WaterPressureAsphaltCoverSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/TechnicalInnovationResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/TechnicalInnovationResultView.cs (.../TechnicalInnovationResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/TechnicalInnovationResultView.cs (.../TechnicalInnovationResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -58,7 +58,7 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(TechnicalInnovationSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/WaterPressureAsphaltCoverResultView.cs
===================================================================
diff -u -r7713ffeaa9f54d0faaf54ec7d2570e775ec99093 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/WaterPressureAsphaltCoverResultView.cs (.../WaterPressureAsphaltCoverResultView.cs) (revision 7713ffeaa9f54d0faaf54ec7d2570e775ec99093)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/SectionResultViews/WaterPressureAsphaltCoverResultView.cs (.../WaterPressureAsphaltCoverResultView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -58,7 +58,7 @@
base.AddDataGridColumns();
DataGridViewControl.AddTextBoxColumn(
- TypeUtils.GetMemberName(sr => sr.AssessmentLayerThree),
+ nameof(WaterPressureAsphaltCoverSectionResultRow.AssessmentLayerThree),
RingtoetsCommonFormsResources.FailureMechanismResultView_InitializeDataGridView_Assessment_layer_three);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/Views/WaveHeightLocationsView.cs (.../WaveHeightLocationsView.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -106,7 +106,7 @@
protected override void InitializeDataGridView()
{
base.InitializeDataGridView();
- dataGridViewControl.AddTextBoxColumn(TypeUtils.GetMemberName(row => row.WaveHeight),
+ dataGridViewControl.AddTextBoxColumn(nameof(WaveHeightLocationRow.WaveHeight),
Resources.HydraulicBoundaryDatabase_Location_WaveHeight_DisplayName);
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/CalculationGroupContextPropertiesTest.cs
===================================================================
diff -u -ra25d8e273425a90e4a8fa870f5fb624f7684ef20 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/CalculationGroupContextPropertiesTest.cs (.../CalculationGroupContextPropertiesTest.cs) (revision a25d8e273425a90e4a8fa870f5fb624f7684ef20)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/CalculationGroupContextPropertiesTest.cs (.../CalculationGroupContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -112,7 +112,7 @@
Data = new TestCalculationGroupContext(calculationGroup, failureMechanismMock)
};
- string propertyName = TypeUtils.GetMemberName(p => p.Name);
+ string propertyName = nameof(CalculationGroupContextProperties.Name);
PropertyInfo nameProperty = properties.GetType().GetProperty(propertyName);
// Call
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationContextPropertiesTest.cs (.../DesignWaterLevelLocationContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -82,22 +82,20 @@
Assert.AreEqual(hydraulicBoundaryLocation.Name, properties.Name);
Assert.AreEqual(hydraulicBoundaryLocation.Location, properties.Location);
Assert.IsNaN(properties.DesignWaterLevel);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.DesignWaterLevel));
+ TestHelper.AssertTypeConverter(
+ nameof(DesignWaterLevelLocationContextProperties.DesignWaterLevel));
Assert.AreEqual(double.NaN, properties.TargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.TargetProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(DesignWaterLevelLocationContextProperties.TargetProbability));
Assert.IsNaN(properties.TargetReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.TargetReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(DesignWaterLevelLocationContextProperties.TargetReliability));
Assert.AreEqual(double.NaN, properties.CalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.CalculatedProbability));
+ TestHelper.AssertTypeConverter(
+ nameof(DesignWaterLevelLocationContextProperties.CalculatedProbability));
Assert.IsNaN(properties.CalculatedReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.CalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(DesignWaterLevelLocationContextProperties.CalculatedReliability));
Assert.AreEqual(string.Empty, properties.Convergence);
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationsContextPropertiesTest.cs
===================================================================
diff -u -r1930dd0513dd2e649905034334d8896d36640c7b -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationsContextPropertiesTest.cs (.../DesignWaterLevelLocationsContextPropertiesTest.cs) (revision 1930dd0513dd2e649905034334d8896d36640c7b)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/DesignWaterLevelLocationsContextPropertiesTest.cs (.../DesignWaterLevelLocationsContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -82,8 +82,8 @@
// Assert
CollectionAssert.AllItemsAreInstancesOfType(properties.Locations, typeof(DesignWaterLevelLocationContextProperties));
Assert.AreEqual(1, properties.Locations.Length);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.Locations));
+ TestHelper.AssertTypeConverter(nameof(DesignWaterLevelLocationsContextProperties.Locations));
DesignWaterLevelLocationContextProperties designWaterLevelLocationProperties = properties.Locations.First();
Assert.AreEqual(location.Name, designWaterLevelLocationProperties.Name);
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationContextPropertiesTest.cs (.../WaveHeightLocationContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -81,22 +81,25 @@
Assert.AreEqual(hydraulicBoundaryLocation.Name, properties.Name);
Assert.AreEqual(hydraulicBoundaryLocation.Location, properties.Location);
Assert.IsNaN(properties.WaveHeight);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.WaveHeight));
+ TestHelper.AssertTypeConverter(
+ nameof(WaveHeightLocationContextProperties.WaveHeight));
Assert.AreEqual(double.NaN, properties.TargetProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.TargetProbability));
+ nameof(WaveHeightLocationContextProperties.TargetProbability));
Assert.IsNaN(properties.TargetReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.TargetReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(WaveHeightLocationContextProperties.TargetReliability));
Assert.AreEqual(double.NaN, properties.CalculatedProbability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- p => p.CalculatedProbability));
+ nameof(WaveHeightLocationContextProperties.CalculatedProbability));
Assert.IsNaN(properties.CalculatedReliability);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.CalculatedReliability));
+ TestHelper.AssertTypeConverter(
+ nameof(WaveHeightLocationContextProperties.CalculatedReliability));
Assert.AreEqual(string.Empty, properties.Convergence);
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationsContextPropertiesTest.cs
===================================================================
diff -u -r1930dd0513dd2e649905034334d8896d36640c7b -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationsContextPropertiesTest.cs (.../WaveHeightLocationsContextPropertiesTest.cs) (revision 1930dd0513dd2e649905034334d8896d36640c7b)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/WaveHeightLocationsContextPropertiesTest.cs (.../WaveHeightLocationsContextPropertiesTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -82,8 +82,8 @@
// Assert
CollectionAssert.AllItemsAreInstancesOfType(properties.Locations, typeof(WaveHeightLocationContextProperties));
Assert.AreEqual(1, properties.Locations.Length);
- Assert.IsTrue(TypeUtils.HasTypeConverter(p => p.Locations));
+ TestHelper.AssertTypeConverter(nameof(WaveHeightLocationsContextProperties.Locations));
WaveHeightLocationContextProperties waveHeightLocationProperties = properties.Locations.First();
Assert.AreEqual(location.Name, waveHeightLocationProperties.Name);
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffInwardsSectionResultRowTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffInwardsSectionResultRowTest.cs (.../GrassCoverSlipOffInwardsSectionResultRowTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffInwardsSectionResultRowTest.cs (.../GrassCoverSlipOffInwardsSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,9 +65,8 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverSlipOffInwardsSectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffOutwardsSectionResultRowTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffOutwardsSectionResultRowTest.cs (.../GrassCoverSlipOffOutwardsSectionResultRowTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/GrassCoverSlipOffOutwardsSectionResultRowTest.cs (.../GrassCoverSlipOffOutwardsSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,9 +65,8 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ TestHelper.AssertTypeConverter(
+ nameof(GrassCoverSlipOffOutwardsSectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs (.../MacrostabilityInwardsSectionResultRowTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityInwardsSectionResultRowTest.cs (.../MacrostabilityInwardsSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,12 +65,12 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerTwoA));
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ nameof(MacrostabilityInwardsSectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRowTest.cs
===================================================================
diff -u -ra1bba29ba0d84061cca88da8324957087d564db9 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRowTest.cs (.../MacrostabilityOutwardsSectionResultRowTest.cs) (revision a1bba29ba0d84061cca88da8324957087d564db9)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MacrostabilityOutwardsSectionResultRowTest.cs (.../MacrostabilityOutwardsSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,12 +65,12 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerTwoA));
- Assert.IsTrue(TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ nameof(MacrostabilityOutwardsSectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MicrostabilitySectionResultRowTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MicrostabilitySectionResultRowTest.cs (.../MicrostabilitySectionResultRowTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/MicrostabilitySectionResultRowTest.cs (.../MicrostabilitySectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,9 +65,8 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter(
- r => r.AssessmentLayerThree));
+ TestHelper.AssertTypeConverter(
+ nameof(MicrostabilitySectionResultRow.AssessmentLayerThree));
}
[Test]
Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/PipingStructureSectionResultRowTest.cs
===================================================================
diff -u -r9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4 -r67dc985cf426cef7a087410db5876d8c3fb51a39
--- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/PipingStructureSectionResultRowTest.cs (.../PipingStructureSectionResultRowTest.cs) (revision 9cdd70c8d4ba76d93b72ef8c1b7df138fa73b0e4)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultRows/PipingStructureSectionResultRowTest.cs (.../PipingStructureSectionResultRowTest.cs) (revision 67dc985cf426cef7a087410db5876d8c3fb51a39)
@@ -22,6 +22,7 @@
using System;
using Core.Common.Base.Data;
using Core.Common.Base.Geometry;
+using Core.Common.TestUtil;
using Core.Common.Utils.Reflection;
using NUnit.Framework;
using Ringtoets.Common.Data.FailureMechanism;
@@ -64,9 +65,8 @@
Assert.AreEqual(result.AssessmentLayerTwoA, row.AssessmentLayerTwoA);
Assert.AreEqual(result.AssessmentLayerThree, row.AssessmentLayerThree);
- Assert.IsTrue(
- TypeUtils.HasTypeConverter