Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/PresentationObjects/HydraulicBoundaryLocationProperties.cs
===================================================================
diff -u -r7235aeaea6e256141b54459aa33da203e84f280b -rb3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/PresentationObjects/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 7235aeaea6e256141b54459aa33da203e84f280b)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/PresentationObjects/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision b3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586)
@@ -21,6 +21,7 @@
using System;
using System.ComponentModel;
+using System.Globalization;
using Core.Common.Base.Geometry;
using Core.Common.Gui.Attributes;
using Core.Common.Gui.PropertyBag;
@@ -49,7 +50,8 @@
/// Gets the Id from the |.
///
[PropertyOrder(1)]
- [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Id")]
+ [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Id_DisplayName")]
+ [ResourcesDescription(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Id_Description")]
public long Id
{
get
@@ -62,7 +64,8 @@
/// Gets the Name from the |.
///
[PropertyOrder(2)]
- [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Name")]
+ [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Name_DisplayName")]
+ [ResourcesDescription(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Name_Description")]
public string Name
{
get
@@ -75,7 +78,8 @@
/// Gets the Location from the |.
///
[PropertyOrder(3)]
- [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Coordinates")]
+ [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Coordinates_DisplayName")]
+ [ResourcesDescription(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_Coordinates_Description")]
public Point2D Location
{
get
@@ -88,12 +92,13 @@
/// Gets the DesignWaterLevel from the |.
///
[PropertyOrder(4)]
- [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_DesignWaterLevel")]
- public double DesignWaterLevel
+ [ResourcesDisplayName(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_DesignWaterLevel_DisplayName")]
+ [ResourcesDescription(typeof(HydraRingResources), "HydraulicBoundaryDatabase_Locations_DesignWaterLevel_Description")]
+ public string DesignWaterLevel
{
get
{
- return data.DesignWaterLevel;
+ return double.IsNaN(data.DesignWaterLevel) ? "" : data.DesignWaterLevel.ToString("G2", CultureInfo.InvariantCulture);
}
}
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/Properties/Resources.Designer.cs
===================================================================
diff -u -rde09e649989e2c4f858632345841f7b9971debe3 -rb3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision de09e649989e2c4f858632345841f7b9971debe3)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision b3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586)
@@ -153,11 +153,20 @@
}
///
+ /// Looks up a localized string similar to Coördinaten van de hydraulische randvoorwaarden locatie..
+ ///
+ public static string HydraulicBoundaryDatabase_Locations_Coordinates_Description {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Coordinates_Description", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Coördinaten.
///
- public static string HydraulicBoundaryDatabase_Locations_Coordinates {
+ public static string HydraulicBoundaryDatabase_Locations_Coordinates_DisplayName {
get {
- return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Coordinates", resourceCulture);
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Coordinates_DisplayName", resourceCulture);
}
}
@@ -171,11 +180,20 @@
}
///
+ /// Looks up a localized string similar to Berekende toetspeil..
+ ///
+ public static string HydraulicBoundaryDatabase_Locations_DesignWaterLevel_Description {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_DesignWaterLevel_Description", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Toetspeil.
///
- public static string HydraulicBoundaryDatabase_Locations_DesignWaterLevel {
+ public static string HydraulicBoundaryDatabase_Locations_DesignWaterLevel_DisplayName {
get {
- return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_DesignWaterLevel", resourceCulture);
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_DesignWaterLevel_DisplayName", resourceCulture);
}
}
@@ -189,20 +207,38 @@
}
///
+ /// Looks up a localized string similar to Id van de hydraulische randvoorwaarden locatie in de database..
+ ///
+ public static string HydraulicBoundaryDatabase_Locations_Id_Description {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Id_Description", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Id.
///
- public static string HydraulicBoundaryDatabase_Locations_Id {
+ public static string HydraulicBoundaryDatabase_Locations_Id_DisplayName {
get {
- return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Id", resourceCulture);
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Id_DisplayName", resourceCulture);
}
}
///
+ /// Looks up a localized string similar to Naam van de hydraulische randvoorwaarden locatie..
+ ///
+ public static string HydraulicBoundaryDatabase_Locations_Name_Description {
+ get {
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Name_Description", resourceCulture);
+ }
+ }
+
+ ///
/// Looks up a localized string similar to Naam.
///
- public static string HydraulicBoundaryDatabase_Locations_Name {
+ public static string HydraulicBoundaryDatabase_Locations_Name_DisplayName {
get {
- return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Name", resourceCulture);
+ return ResourceManager.GetString("HydraulicBoundaryDatabase_Locations_Name_DisplayName", resourceCulture);
}
}
Index: Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/Properties/Resources.resx
===================================================================
diff -u -rde09e649989e2c4f858632345841f7b9971debe3 -rb3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586
--- Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/Properties/Resources.resx (.../Resources.resx) (revision de09e649989e2c4f858632345841f7b9971debe3)
+++ Ringtoets/HydraRing/src/Ringtoets.HydraRing.Forms/Properties/Resources.resx (.../Resources.resx) (revision b3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586)
@@ -173,16 +173,28 @@
Locaties
-
+
Coördinaten
-
+
Toetspeil
-
+
Id
-
+
Naam
+
+ Coördinaten van de hydraulische randvoorwaarden locatie.
+
+
+ Berekende toetspeil.
+
+
+ Id van de hydraulische randvoorwaarden locatie in de database.
+
+
+ Naam van de hydraulische randvoorwaarden locatie.
+
\ No newline at end of file
Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Forms.Test/PresentationObjects/HydraulicBoundaryLocationPropertiesTest.cs
===================================================================
diff -u -r7235aeaea6e256141b54459aa33da203e84f280b -rb3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586
--- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Forms.Test/PresentationObjects/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 7235aeaea6e256141b54459aa33da203e84f280b)
+++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Forms.Test/PresentationObjects/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision b3d8fe1ed3a592f768c7305d5b3e62ae5f1a7586)
@@ -20,6 +20,7 @@
// All rights reserved.
using System.ComponentModel;
+using System.Globalization;
using Core.Common.Base.Geometry;
using Core.Common.Gui.PropertyBag;
using NUnit.Framework;
@@ -65,16 +66,10 @@
Point2D coordinates = new Point2D(x, y);
string name = "";
double designWaterLevel = 741.0;
+ string expectedDesignWaterLevel = designWaterLevel.ToString("G2", CultureInfo.InvariantCulture);
var mockRepository = new MockRepository();
- object[] hydraulicBoundaryLocationArguments =
- {
- id,
- name,
- x,
- y
- };
- var hydraulicBoundaryLocationMock = mockRepository.StrictMock(hydraulicBoundaryLocationArguments);
+ var hydraulicBoundaryLocationMock = mockRepository.StrictMock(id, name, x, y);
hydraulicBoundaryLocationMock.DesignWaterLevel = designWaterLevel;
mockRepository.ReplayAll();
@@ -84,7 +79,7 @@
// Assert
Assert.AreEqual(id, hydraulicBoundaryLocationProperties.Id);
Assert.AreEqual(name, hydraulicBoundaryLocationProperties.Name);
- Assert.AreEqual(designWaterLevel, hydraulicBoundaryLocationProperties.DesignWaterLevel);
+ Assert.AreEqual(expectedDesignWaterLevel, hydraulicBoundaryLocationProperties.DesignWaterLevel);
Assert.AreEqual(coordinates, hydraulicBoundaryLocationProperties.Location);
mockRepository.VerifyAll();
}
@@ -134,6 +129,10 @@
const string expectedNameDisplayName = "Naam";
const string expectedLocationDisplayName = "Coördinaten";
const string expectedDesignWaterLevelDisplayName = "Toetspeil";
+ const string expectedIdDescription = "Id van de hydraulische randvoorwaarden locatie in de database.";
+ const string expectedNameDescriptione = "Naam van de hydraulische randvoorwaarden locatie.";
+ const string expectedLocationDescriptione = "Coördinaten van de hydraulische randvoorwaarden locatie.";
+ const string expectedDesignWaterLevelDescription = "Berekende toetspeil.";
// Call
TypeConverter classTypeConverter = TypeDescriptor.GetConverter(hydraulicBoundaryLocationProperties, true);
@@ -150,21 +149,25 @@
Assert.IsTrue(idProperty.IsReadOnly);
Assert.IsTrue(idProperty.IsBrowsable);
Assert.AreEqual(expectedIdDisplayName, idProperty.DisplayName);
+ Assert.AreEqual(expectedIdDescription, idProperty.Description);
Assert.IsNotNull(nameProperty);
Assert.IsTrue(nameProperty.IsReadOnly);
Assert.IsTrue(nameProperty.IsBrowsable);
Assert.AreEqual(expectedNameDisplayName, nameProperty.DisplayName);
+ Assert.AreEqual(expectedNameDescriptione, nameProperty.Description);
Assert.IsNotNull(locationProperty);
Assert.IsTrue(locationProperty.IsReadOnly);
Assert.IsTrue(locationProperty.IsBrowsable);
Assert.AreEqual(expectedLocationDisplayName, locationProperty.DisplayName);
+ Assert.AreEqual(expectedLocationDescriptione, locationProperty.Description);
Assert.IsNotNull(designWaterLevelProperty);
Assert.IsTrue(designWaterLevelProperty.IsReadOnly);
Assert.IsTrue(designWaterLevelProperty.IsBrowsable);
Assert.AreEqual(expectedDesignWaterLevelDisplayName, designWaterLevelProperty.DisplayName);
+ Assert.AreEqual(expectedDesignWaterLevelDescription, designWaterLevelProperty.Description);
mockRepository.VerifyAll();
}