Index: Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionConverterTest.cs =================================================================== diff -u -r0fd23ff8e68b5f0d18d344d104bc68216cb49b51 -r342ecb50ef0e54c04002a2643689c6d0108518c7 --- Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionConverterTest.cs (.../WindDirectionConverterTest.cs) (revision 0fd23ff8e68b5f0d18d344d104bc68216cb49b51) +++ Ringtoets/Common/test/Ringtoets.Common.Service.Test/IllustrationPoints/WindDirectionConverterTest.cs (.../WindDirectionConverterTest.cs) (revision 342ecb50ef0e54c04002a2643689c6d0108518c7) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using Core.Common.TestUtil; using NUnit.Framework; using Ringtoets.Common.Data.Hydraulics.IllustrationPoints; using Ringtoets.Common.Data.TestUtil; @@ -44,53 +43,12 @@ } [Test] - public void CreateWindDirection_HydraWindDirectionNameNull_ThrowsArgumentNullException() - { - // Setup - var hydraWindDirection = new HydraWindDirection - { - Angle = 0 - }; - - // Call - TestDelegate call = () => WindDirectionConverter.CreateWindDirection(hydraWindDirection); - - // Assert - Assert.Throws(call); - } - - [Test] - [TestCase(-1)] - [TestCase(361)] - [SetCulture("nl-NL")] - public void CreateWindDirection_InvalidAngle_ThrowsArgumentOutOfRangeException(double angle) - { - // Setup - var hydraWindDirection = new HydraWindDirection - { - Angle = angle, - Name = "Name" - }; - - // Call - TestDelegate call = () => WindDirectionConverter.CreateWindDirection(hydraWindDirection); - - // Assert - const string expectedErrorMessage = "De waarde voor de windrichting moet in het bereik van [0,00, 360,00] liggen."; - var exception = TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, expectedErrorMessage); - Assert.AreEqual("angle", exception.ParamName); - } - - [Test] public void CreateWindDirection_ValidArguments_ExpectedProperties() { // Setup var random = new Random(21); - var hydraWindDirection = new HydraWindDirection - { - Angle = random.GetFromRange(0.0, 360.0), - Name = "Name" - }; + double angle = random.NextDouble(); + var hydraWindDirection = new HydraWindDirection("name", angle); // Call WindDirection windDirection = WindDirectionConverter.CreateWindDirection(hydraWindDirection);