Index: Riskeer/Storage/src/Riskeer.Storage.Core/Create/CalculationGroupCreateExtensions.cs =================================================================== diff -u -r48f21c3256c73e5c4cbfed18a190b45223a1567d -r025f9ba989e5d3ec226ac9a46fa76325d03e8917 --- Riskeer/Storage/src/Riskeer.Storage.Core/Create/CalculationGroupCreateExtensions.cs (.../CalculationGroupCreateExtensions.cs) (revision 48f21c3256c73e5c4cbfed18a190b45223a1567d) +++ Riskeer/Storage/src/Riskeer.Storage.Core/Create/CalculationGroupCreateExtensions.cs (.../CalculationGroupCreateExtensions.cs) (revision 025f9ba989e5d3ec226ac9a46fa76325d03e8917) @@ -108,7 +108,7 @@ entity.HeightStructuresCalculationEntities.Add(childHeightStructuresCalculation.CreateForHeightStructures(registry, i)); } - if (calculationBase is StructuresCalculation childClosingStructuresCalculation) + if (calculationBase is StructuresCalculationScenario childClosingStructuresCalculation) { entity.ClosingStructuresCalculationEntities.Add(childClosingStructuresCalculation.CreateForClosingStructures(registry, i)); } Index: Riskeer/Storage/src/Riskeer.Storage.Core/Create/StructuresCalculationCreateExtensions.cs =================================================================== diff -u -r2982ab02b70c890c163e4b07208f86e1e5db1804 -r025f9ba989e5d3ec226ac9a46fa76325d03e8917 --- Riskeer/Storage/src/Riskeer.Storage.Core/Create/StructuresCalculationCreateExtensions.cs (.../StructuresCalculationCreateExtensions.cs) (revision 2982ab02b70c890c163e4b07208f86e1e5db1804) +++ Riskeer/Storage/src/Riskeer.Storage.Core/Create/StructuresCalculationCreateExtensions.cs (.../StructuresCalculationCreateExtensions.cs) (revision 025f9ba989e5d3ec226ac9a46fa76325d03e8917) @@ -92,15 +92,15 @@ /// /// Creates a based - /// on the information of the . + /// on the information of the . /// /// The calculation to create a database entity for. /// The object keeping track of create operations. /// The index at where resides /// in its parent container. /// A new . /// Thrown when is null. - internal static ClosingStructuresCalculationEntity CreateForClosingStructures(this StructuresCalculation calculation, + internal static ClosingStructuresCalculationEntity CreateForClosingStructures(this StructuresCalculationScenario calculation, PersistenceRegistry registry, int order) { if (registry == null) Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/CalculationGroupCreateExtensionsTest.cs =================================================================== diff -u -r48f21c3256c73e5c4cbfed18a190b45223a1567d -r025f9ba989e5d3ec226ac9a46fa76325d03e8917 --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/CalculationGroupCreateExtensionsTest.cs (.../CalculationGroupCreateExtensionsTest.cs) (revision 48f21c3256c73e5c4cbfed18a190b45223a1567d) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/CalculationGroupCreateExtensionsTest.cs (.../CalculationGroupCreateExtensionsTest.cs) (revision 025f9ba989e5d3ec226ac9a46fa76325d03e8917) @@ -48,11 +48,11 @@ var group = new CalculationGroup(); // Call - TestDelegate call = () => group.Create(null, 0); + void Call() => @group.Create(null, 0); // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("registry", paramName); + var exception = Assert.Throws(Call); + Assert.AreEqual("registry", exception.ParamName); } [Test] @@ -824,11 +824,11 @@ { Children = { - new StructuresCalculation + new StructuresCalculationScenario { Name = "A" }, - new StructuresCalculation + new StructuresCalculationScenario { Name = "B" } @@ -864,15 +864,15 @@ { Name = "A" }, - new StructuresCalculation + new StructuresCalculationScenario { Name = "B" }, new CalculationGroup { Name = "C" }, - new StructuresCalculation + new StructuresCalculationScenario { Name = "D" } Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/StructuresCalculationCreateExtensionsTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r025f9ba989e5d3ec226ac9a46fa76325d03e8917 --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/StructuresCalculationCreateExtensionsTest.cs (.../StructuresCalculationCreateExtensionsTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Create/StructuresCalculationCreateExtensionsTest.cs (.../StructuresCalculationCreateExtensionsTest.cs) (revision 025f9ba989e5d3ec226ac9a46fa76325d03e8917) @@ -59,11 +59,11 @@ var calculation = new StructuresCalculation(); // Call - TestDelegate call = () => calculation.CreateForHeightStructures(null, 0); + void Call() => calculation.CreateForHeightStructures(null, 0); // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("registry", paramName); + var exception = Assert.Throws(Call); + Assert.AreEqual("registry", exception.ParamName); } [Test] @@ -361,7 +361,7 @@ public void CreateForClosingStructures_RegistryIsNull_ThrowArgumentNullException() { // Setup - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); // Call TestDelegate call = () => calculation.CreateForClosingStructures(null, 0); @@ -376,7 +376,7 @@ { // Setup var random = new Random(45); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Name = "A", Comments = @@ -521,7 +521,7 @@ public void CreateForClosingStructures_CalculationWithParametersNaN_ReturnEntityWithNullParameters() { // Setup - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -632,7 +632,7 @@ { // Setup ClosingStructure alreadyRegisteredStructure = new TestClosingStructure(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -655,7 +655,7 @@ { // Setup var alreadyRegisteredHydraulicBoundaryLocation = new HydraulicBoundaryLocation(1, "A", 2, 3); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -678,7 +678,7 @@ { // Setup var alreadyRegisteredForeshoreProfile = new TestForeshoreProfile(); - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { InputParameters = { @@ -700,7 +700,7 @@ public void CreateForClosingStructures_CalculationWithOutput_ReturnEntity() { // Setup - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Output = new TestStructuresOutput() };