Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs =================================================================== diff -u -r1e9309149f9387c4e8b10f6c5f429797220b0ef8 -r3664d59720d320c290ba63f3c1ddd85a57e50de0 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 1e9309149f9387c4e8b10f6c5f429797220b0ef8) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 3664d59720d320c290ba63f3c1ddd85a57e50de0) @@ -20,14 +20,11 @@ // All rights reserved. using System; - using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.Read; using Application.Ringtoets.Storage.TestUtil; using Core.Common.Base.Geometry; - using NUnit.Framework; - using Ringtoets.GrassCoverErosionInwards.Data; using Ringtoets.HydraRing.Data; using Ringtoets.Piping.Data; @@ -42,21 +39,21 @@ #region StochasticSoilProfileEntity: Read, Contains, Get [Test] - public void Contains_WithoutStochasticSoilProfileEntity_ArgumentNullException() + public void Contains_WithoutStochasticSoilProfileEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((StochasticSoilProfileEntity)null); + TestDelegate test = () => collector.Contains((StochasticSoilProfileEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_StochasticSoilProfileEntityAdded_True() + public void Contains_StochasticSoilProfileEntityAdded_ReturnsTrue() { // Setup var collector = new ReadConversionCollector(); @@ -71,7 +68,7 @@ } [Test] - public void Contains_NoStochasticSoilProfileEntityAdded_False() + public void Contains_NoStochasticSoilProfileEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -85,7 +82,7 @@ } [Test] - public void Contains_OtherStochasticSoilProfileEntityAdded_False() + public void Contains_OtherStochasticSoilProfileEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -100,13 +97,13 @@ } [Test] - public void Get_WithoutStochasticSoilProfileEntity_ThrowArgumentNullException() + public void Get_WithoutStochasticSoilProfileEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((StochasticSoilProfileEntity)null); + TestDelegate test = () => collector.Get((StochasticSoilProfileEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; @@ -191,21 +188,21 @@ #region SoilProfileEntity: Read, Contains, Get [Test] - public void Contains_WithoutEntity_ArgumentNullException() + public void Contains_WithoutEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((SoilProfileEntity)null); + TestDelegate test = () => collector.Contains((SoilProfileEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_SoilProfileAdded_True() + public void Contains_SoilProfileAdded_ReturnsTrue() { // Setup var collector = new ReadConversionCollector(); @@ -220,7 +217,7 @@ } [Test] - public void Contains_NoSoilProfileAdded_False() + public void Contains_NoSoilProfileAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -234,7 +231,7 @@ } [Test] - public void Contains_OtherSoilProfileEntityAdded_False() + public void Contains_OtherSoilProfileEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -249,13 +246,13 @@ } [Test] - public void Get_WithoutSoilProfileEntity_ThrowArgumentNullException() + public void Get_WithoutSoilProfileEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((SoilProfileEntity)null); + TestDelegate test = () => collector.Get((SoilProfileEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; @@ -340,21 +337,21 @@ #region SurfaceLineEntity: Read, Contains, Get [Test] - public void Contains_SurfaceLineEntityIsNull_ThrowArgumentNullException() + public void Contains_SurfaceLineEntityIsNull_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate call = () => collector.Contains((SurfaceLineEntity)null); + TestDelegate call = () => collector.Contains((SurfaceLineEntity) null); // Assert string paramName = Assert.Throws(call).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_SurfaceLineEntityAdded_True() + public void Contains_SurfaceLineEntityAdded_ReturnsTrue() { // Setup var entity = new SurfaceLineEntity(); @@ -371,7 +368,7 @@ } [Test] - public void Contains_SurfaceLineEntityNotAdded_False() + public void Contains_SurfaceLineEntityNotAdded_ReturnsFalse() { // Setup var entity = new SurfaceLineEntity(); @@ -386,7 +383,7 @@ } [Test] - public void Contains_OtherSurfaceLineEntityAdded_False() + public void Contains_OtherSurfaceLineEntityAdded_ReturnsFalse() { // Setup var registeredEntity = new SurfaceLineEntity(); @@ -405,13 +402,13 @@ } [Test] - public void Get_SurfaceLineEntityIsNull_ThrowArgumentNullException() + public void Get_SurfaceLineEntityIsNull_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate call = () => collector.Get((SurfaceLineEntity)null); + TestDelegate call = () => collector.Get((SurfaceLineEntity) null); // Assert string paramName = Assert.Throws(call).ParamName; @@ -502,21 +499,21 @@ #region SurfaceLinePointEntity: Read, Contains, Get [Test] - public void Contains_SurfaceLinePointsEntityIsNull_ThrowArgumentNullException() + public void Contains_SurfaceLinePointsEntityIsNull_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate call = () => collector.Contains((SurfaceLinePointEntity)null); + TestDelegate call = () => collector.Contains((SurfaceLinePointEntity) null); // Assert string paramName = Assert.Throws(call).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_SurfaceLinePointEntityAdded_True() + public void Contains_SurfaceLinePointEntityAdded_ReturnsTrue() { // Setup var entity = new SurfaceLinePointEntity(); @@ -533,7 +530,7 @@ } [Test] - public void Contains_SurfaceLinePointEntityNotAdded_False() + public void Contains_SurfaceLinePointEntityNotAdded_ReturnsFalse() { // Setup var entity = new SurfaceLinePointEntity(); @@ -548,7 +545,7 @@ } [Test] - public void Contains_OtherSurfaceLinePointEntityAdded_False() + public void Contains_OtherSurfaceLinePointEntityAdded_ReturnsFalse() { // Setup var registeredEntity = new SurfaceLinePointEntity(); @@ -567,13 +564,13 @@ } [Test] - public void Get_SurfaceLinePointEntityIsNull_ThrowArgumentNullException() + public void Get_SurfaceLinePointEntityIsNull_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate call = () => collector.Get((SurfaceLinePointEntity)null); + TestDelegate call = () => collector.Get((SurfaceLinePointEntity) null); // Assert string paramName = Assert.Throws(call).ParamName; @@ -664,21 +661,21 @@ #region HydraulicLocationEntity: Read, Contains, Get [Test] - public void Contains_WithoutHydraulicLocationEntity_ArgumentNullException() + public void Contains_WithoutHydraulicLocationEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((HydraulicLocationEntity)null); + TestDelegate test = () => collector.Contains((HydraulicLocationEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_HydraulicLocationEntityAdded_True() + public void Contains_HydraulicLocationEntityAdded_ReturnsTrue() { // Setup var collector = new ReadConversionCollector(); @@ -693,7 +690,7 @@ } [Test] - public void Contains_NoHydraulicLocationEntityAdded_False() + public void Contains_NoHydraulicLocationEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -707,7 +704,7 @@ } [Test] - public void Contains_OtherHydraulicLocationEntityAdded_False() + public void Contains_OtherHydraulicLocationEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -722,13 +719,13 @@ } [Test] - public void Get_WithoutHydraulicLocationEntity_ThrowArgumentNullException() + public void Get_WithoutHydraulicLocationEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((HydraulicLocationEntity)null); + TestDelegate test = () => collector.Get((HydraulicLocationEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; @@ -771,7 +768,7 @@ // Setup var collector = new ReadConversionCollector(); var entity = new HydraulicLocationEntity(); - collector.Read(new HydraulicLocationEntity(), new HydraulicBoundaryLocation(1,"A", 1, 1)); + collector.Read(new HydraulicLocationEntity(), new HydraulicBoundaryLocation(1, "A", 1, 1)); // Call TestDelegate test = () => collector.Get(entity); @@ -813,21 +810,21 @@ #region FailureMechanismSectionEntity: Read, Contains, Get [Test] - public void Contains_WithoutFailureMechanismSectionEntity_ArgumentNullException() + public void Contains_WithoutFailureMechanismSectionEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((FailureMechanismSectionEntity)null); + TestDelegate test = () => collector.Contains((FailureMechanismSectionEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_FailureMechanismSectionEntityAdded_True() + public void Contains_FailureMechanismSectionEntityAdded_ReturnsTrue() { // Setup var collector = new ReadConversionCollector(); @@ -842,7 +839,7 @@ } [Test] - public void Contains_NoFailureMechanismSectionEntityAdded_False() + public void Contains_NoFailureMechanismSectionEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -856,7 +853,7 @@ } [Test] - public void Contains_OtherFailureMechanismSectionEntityAdded_False() + public void Contains_OtherFailureMechanismSectionEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -871,13 +868,13 @@ } [Test] - public void Get_WithoutFailureMechanismSectionEntity_ThrowArgumentNullException() + public void Get_WithoutFailureMechanismSectionEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((FailureMechanismSectionEntity)null); + TestDelegate test = () => collector.Get((FailureMechanismSectionEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; @@ -962,21 +959,21 @@ #region DikeProfileEntity: Read, Contains, Get [Test] - public void Contains_WithoutDikeProfileEntity_ArgumentNullException() + public void Contains_WithoutDikeProfileEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((DikeProfileEntity)null); + TestDelegate test = () => collector.Contains((DikeProfileEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_DikeProfileEntityAdded_True() + public void Contains_DikeProfileEntityAdded_ReturnsTrue() { // Setup var collector = new ReadConversionCollector(); @@ -991,7 +988,7 @@ } [Test] - public void Contains_NoDikeProfileEntityAdded_False() + public void Contains_NoDikeProfileEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -1005,7 +1002,7 @@ } [Test] - public void Contains_OtherDikeProfileEntityAdded_False() + public void Contains_OtherDikeProfileEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -1020,13 +1017,13 @@ } [Test] - public void Get_WithoutDikeProfileEntity_ThrowArgumentNullException() + public void Get_WithoutDikeProfileEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((DikeProfileEntity)null); + TestDelegate test = () => collector.Get((DikeProfileEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; @@ -1051,7 +1048,7 @@ private static DikeProfile CreateDikeProfile() { - return new DikeProfile(new Point2D(0,0), new RoughnessPoint[0], new Point2D[0], + return new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties()); } @@ -1117,21 +1114,21 @@ #region GrassCoverErosionInwardsCalculationEntity: Read, Contains, Get [Test] - public void Contains_WithoutGrassCoverErosionInwardsCalculationEntity_ArgumentNullException() + public void Contains_WithoutGrassCoverErosionInwardsCalculationEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Contains((GrassCoverErosionInwardsCalculationEntity)null); + TestDelegate test = () => collector.Contains((GrassCoverErosionInwardsCalculationEntity) null); // Assert var paramName = Assert.Throws(test).ParamName; Assert.AreEqual("entity", paramName); } [Test] - public void Contains_GrassCoverErosionInwardsCalculationEntityAdded_True() + public void Contains_GrassCoverErosionInwardsCalculationEntityAdded_ReturnsTrue() { // Setup var collector = new ReadConversionCollector(); @@ -1146,7 +1143,7 @@ } [Test] - public void Contains_NoGrassCoverErosionInwardsCalculationEntityAdded_False() + public void Contains_NoGrassCoverErosionInwardsCalculationEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -1160,7 +1157,7 @@ } [Test] - public void Contains_OtherGrassCoverErosionInwardsCalculationEntityAdded_False() + public void Contains_OtherGrassCoverErosionInwardsCalculationEntityAdded_ReturnsFalse() { // Setup var collector = new ReadConversionCollector(); @@ -1175,13 +1172,13 @@ } [Test] - public void Get_WithoutGrassCoverErosionInwardsCalculationEntity_ThrowArgumentNullException() + public void Get_WithoutGrassCoverErosionInwardsCalculationEntity_ThrowsArgumentNullException() { // Setup var collector = new ReadConversionCollector(); // Call - TestDelegate test = () => collector.Get((GrassCoverErosionInwardsCalculationEntity)null); + TestDelegate test = () => collector.Get((GrassCoverErosionInwardsCalculationEntity) null); // Assert var paramName = Assert.Throws(test).ParamName;