Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/HydraulicBoundaryLocationCalculationPropertiesTest.cs =================================================================== diff -u -rda7bb9a6d96d7118d6dcdc2ee17a11d5b43f44c7 -r8eb9358f28dc1eaedd25a81117b02096e12f8d65 --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/HydraulicBoundaryLocationCalculationPropertiesTest.cs (.../HydraulicBoundaryLocationCalculationPropertiesTest.cs) (revision da7bb9a6d96d7118d6dcdc2ee17a11d5b43f44c7) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/HydraulicBoundaryLocationCalculationPropertiesTest.cs (.../HydraulicBoundaryLocationCalculationPropertiesTest.cs) (revision 8eb9358f28dc1eaedd25a81117b02096e12f8d65) @@ -344,11 +344,10 @@ } [Test] - [TestCase("")] - [TestCase("some name")] - public void ToString_WithName_ReturnsName(string name) + public void ToString_Always_ReturnsNameAndLocation() { // Setup + const string name = "test"; const long id = 1234L; const double x = 567.0; const double y = 890.0; Index: Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs =================================================================== diff -u -r78c0fe7b218d1d1dd95fd28612f947e71a22c671 -r8eb9358f28dc1eaedd25a81117b02096e12f8d65 --- Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 78c0fe7b218d1d1dd95fd28612f947e71a22c671) +++ Ringtoets/Integration/src/Ringtoets.Integration.Forms/PropertyClasses/HydraulicBoundaryLocationProperties.cs (.../HydraulicBoundaryLocationProperties.cs) (revision 8eb9358f28dc1eaedd25a81117b02096e12f8d65) @@ -87,5 +87,10 @@ return data.Location; } } + + public override string ToString() + { + return $"{Name} {Location}"; + } } } \ No newline at end of file Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs =================================================================== diff -u -r78c0fe7b218d1d1dd95fd28612f947e71a22c671 -r8eb9358f28dc1eaedd25a81117b02096e12f8d65 --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 78c0fe7b218d1d1dd95fd28612f947e71a22c671) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/PropertyClasses/HydraulicBoundaryLocationPropertiesTest.cs (.../HydraulicBoundaryLocationPropertiesTest.cs) (revision 8eb9358f28dc1eaedd25a81117b02096e12f8d65) @@ -121,5 +121,23 @@ var coordinates = new Point2D(x, y); Assert.AreEqual(coordinates, properties.Location); } + + [Test] + public void ToString_Always_ReturnsNameAndLocation() + { + // Setup + const string name = "test"; + const long id = 1234L; + const double x = 567.0; + const double y = 890.0; + var hydraulicBoundaryLocation = new HydraulicBoundaryLocation(id, name, x, y); + + // Call + var properties = new HydraulicBoundaryLocationProperties(hydraulicBoundaryLocation); + + // Assert + string expectedString = $"{name} {new Point2D(x, y)}"; + Assert.AreEqual(expectedString, properties.ToString()); + } } } \ No newline at end of file