Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs =================================================================== diff -u -r0e541f9ed4d56646332e86aea1b3c699c650563b -rc703acd9b4aa18825e6938815ba975c34949cc6f --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 0e541f9ed4d56646332e86aea1b3c699c650563b) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision c703acd9b4aa18825e6938815ba975c34949cc6f) @@ -20,7 +20,6 @@ // All rights reserved. using System.ComponentModel; -using System.Globalization; using Core.Common.Base.Geometry; using Core.Common.Gui.PropertyBag; using NUnit.Framework; @@ -65,12 +64,9 @@ double y = 890.0; Point2D coordinates = new Point2D(x, y); string name = ""; - double designWaterLevel = 5.123456; - string expectedDesignWaterLevel = designWaterLevel.ToString("F2", CultureInfo.InvariantCulture); var mockRepository = new MockRepository(); var hydraulicBoundaryLocationMock = mockRepository.StrictMock(id, name, x, y); - hydraulicBoundaryLocationMock.DesignWaterLevel = designWaterLevel; mockRepository.ReplayAll(); // Call @@ -79,7 +75,6 @@ // Assert Assert.AreEqual(id, hydraulicBoundaryLocationProperties.Id); Assert.AreEqual(name, hydraulicBoundaryLocationProperties.Name); - Assert.AreEqual(expectedDesignWaterLevel, hydraulicBoundaryLocationProperties.DesignWaterLevel); Assert.AreEqual(coordinates, hydraulicBoundaryLocationProperties.Location); mockRepository.VerifyAll(); } @@ -127,21 +122,19 @@ const string expectedIdDisplayName = "ID"; const string expectedNameDisplayName = "Naam"; const string expectedLocationDisplayName = "Coördinaten [m]"; - const string expectedDesignWaterLevelDisplayName = "Toetspeil [m+NAP]"; const string expectedIdDescription = "Id van de hydraulische randvoorwaardenlocatie in de database."; - const string expectedNameDescriptione = "Naam van de hydraulische randvoorwaardenlocatie."; - const string expectedLocationDescriptione = "Coördinaten van de hydraulische randvoorwaardenlocatie."; - const string expectedDesignWaterLevelDescription = "Berekend toetspeil."; + const string expectedNameDescription = "Naam van de hydraulische randvoorwaardenlocatie."; + const string expectedLocationDescription = "Coördinaten van de hydraulische randvoorwaardenlocatie."; // Call TypeConverter classTypeConverter = TypeDescriptor.GetConverter(hydraulicBoundaryLocationProperties, true); - PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); - PropertyDescriptor idProperty = dynamicProperties[0]; - PropertyDescriptor nameProperty = dynamicProperties[1]; - PropertyDescriptor locationProperty = dynamicProperties[2]; - PropertyDescriptor designWaterLevelProperty = dynamicProperties[3]; // Assert + PropertyDescriptorCollection dynamicProperties = dynamicPropertyBag.GetProperties(); + PropertyDescriptor idProperty = dynamicProperties.Find("Id", false); + PropertyDescriptor nameProperty = dynamicProperties.Find("Name", false); + PropertyDescriptor locationProperty = dynamicProperties.Find("Location", false); + Assert.IsInstanceOf(classTypeConverter); Assert.IsNotNull(idProperty); @@ -154,20 +147,14 @@ Assert.IsTrue(nameProperty.IsReadOnly); Assert.IsTrue(nameProperty.IsBrowsable); Assert.AreEqual(expectedNameDisplayName, nameProperty.DisplayName); - Assert.AreEqual(expectedNameDescriptione, nameProperty.Description); + Assert.AreEqual(expectedNameDescription, nameProperty.Description); Assert.IsNotNull(locationProperty); Assert.IsTrue(locationProperty.IsReadOnly); Assert.IsTrue(locationProperty.IsBrowsable); Assert.AreEqual(expectedLocationDisplayName, locationProperty.DisplayName); - Assert.AreEqual(expectedLocationDescriptione, locationProperty.Description); + Assert.AreEqual(expectedLocationDescription, 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(); } }