Index: Riskeer/Storage/src/Riskeer.Storage.Core/Read/ReadConversionCollector.cs =================================================================== diff -u -red11c91a52b5418784ec7327ee15abb6ddda69a2 -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/src/Riskeer.Storage.Core/Read/ReadConversionCollector.cs (.../ReadConversionCollector.cs) (revision ed11c91a52b5418784ec7327ee15abb6ddda69a2) +++ Riskeer/Storage/src/Riskeer.Storage.Core/Read/ReadConversionCollector.cs (.../ReadConversionCollector.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -105,8 +105,8 @@ private readonly Dictionary> closingStructuresCalculations = CreateDictionary>(); - private readonly Dictionary> stabilityPointStructuresCalculations = - CreateDictionary>(); + private readonly Dictionary> stabilityPointStructuresCalculations = + CreateDictionary>(); private static Dictionary CreateDictionary() { @@ -1536,15 +1536,15 @@ /// /// Registers a read operation for - /// and the that was constructed + /// and the that was constructed /// with the information. /// /// The /// that was read. - /// The that + /// The that /// was constructed. /// Thrown when any input parameter is null. - internal void Read(StabilityPointStructuresCalculationEntity entity, StructuresCalculation model) + internal void Read(StabilityPointStructuresCalculationEntity entity, StructuresCalculationScenario model) { if (entity == null) { @@ -1576,18 +1576,18 @@ } /// - /// Obtains the which was read + /// Obtains the which was read /// for the given . /// /// The for which a read /// operation has been registered. - /// The constructed . + /// The constructed . /// Thrown when is null. /// Thrown when no read operation has /// been registered for . /// Use /// to find out whether a read operation has been registered for . - internal StructuresCalculation Get(StabilityPointStructuresCalculationEntity entity) + internal StructuresCalculationScenario Get(StabilityPointStructuresCalculationEntity entity) { if (entity == null) { Index: Riskeer/Storage/src/Riskeer.Storage.Core/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensions.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/src/Riskeer.Storage.Core/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensions.cs (.../StabilityPointStructuresCalculationEntityReadExtensions.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Storage/src/Riskeer.Storage.Core/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensions.cs (.../StabilityPointStructuresCalculationEntityReadExtensions.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -44,8 +44,8 @@ /// The object keeping track of read operations. /// A new . /// Thrown when is null. - internal static StructuresCalculation Read(this StabilityPointStructuresCalculationEntity entity, - ReadConversionCollector collector) + internal static StructuresCalculationScenario Read(this StabilityPointStructuresCalculationEntity entity, + ReadConversionCollector collector) { if (collector == null) { @@ -57,7 +57,7 @@ return collector.Get(entity); } - var calculation = new StructuresCalculation + var calculation = new StructuresCalculationScenario { Name = entity.Name, Comments = Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -red11c91a52b5418784ec7327ee15abb6ddda69a2 -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision ed11c91a52b5418784ec7327ee15abb6ddda69a2) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -545,9 +545,9 @@ AssertStructuresCalculation(expectedClosingStructuresCalculation, (StructuresCalculationScenario) actualChild); } - if (expectedChild is StructuresCalculation expectedStabilityPointStructuresCalculation) + if (expectedChild is StructuresCalculationScenario expectedStabilityPointStructuresCalculation) { - AssertStructuresCalculation(expectedStabilityPointStructuresCalculation, (StructuresCalculation) actualChild); + AssertStructuresCalculation(expectedStabilityPointStructuresCalculation, (StructuresCalculationScenario) actualChild); } if (expectedChild is StabilityStoneCoverWaveConditionsCalculation expectedStabilityStoneCoverWaveConditionsCalculation) Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/ReadConversionCollectorTest.cs =================================================================== diff -u -red11c91a52b5418784ec7327ee15abb6ddda69a2 -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision ed11c91a52b5418784ec7327ee15abb6ddda69a2) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/ReadConversionCollectorTest.cs (.../ReadConversionCollectorTest.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -440,17 +440,17 @@ } [TestFixture] - private class StabilityPointStructureCalculationCollectorTest : CollectorTest, + private class StabilityPointStructureCalculationCollectorTest : CollectorTest, StabilityPointStructuresCalculationEntity> { public StabilityPointStructureCalculationCollectorTest() : base( (c, e, m) => c.Read(e, m), (c, e) => c.Contains(e), (c, e) => c.Get(e)) {} - protected override StructuresCalculation CreateDataModel() + protected override StructuresCalculationScenario CreateDataModel() { - return new StructuresCalculation(); + return new StructuresCalculationScenario(); } } Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs (.../StabilityPointStructuresCalculationEntityReadExtensionsTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StabilityPointStructures/StabilityPointStructuresCalculationEntityReadExtensionsTest.cs (.../StabilityPointStructuresCalculationEntityReadExtensionsTest.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -43,11 +43,11 @@ var entity = new StabilityPointStructuresCalculationEntity(); // Call - TestDelegate call = () => entity.Read(null); + void Call() => entity.Read(null); // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("collector", paramName); + var exception = Assert.Throws(Call); + Assert.AreEqual("collector", exception.ParamName); } [Test] @@ -407,13 +407,13 @@ } }; - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var collector = new ReadConversionCollector(); collector.Read(entity, calculation); // Call - StructuresCalculation returnedCalculation = entity.Read(collector); + StructuresCalculationScenario returnedCalculation = entity.Read(collector); // Assert Assert.AreSame(calculation, returnedCalculation); Index: Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs =================================================================== diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea) +++ Riskeer/Storage/test/Riskeer.Storage.Core.Test/Read/StabilityPointStructures/StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs (.../StabilityPointStructuresSectionResultEntityReadExtensionsTest.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -39,12 +39,12 @@ public void Read_EntityNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => ((StabilityPointStructuresSectionResultEntity) null).Read( - new StabilityPointStructuresFailureMechanismSectionResult(FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), - new ReadConversionCollector()); + void Call() => ((StabilityPointStructuresSectionResultEntity) null).Read(new StabilityPointStructuresFailureMechanismSectionResult( + FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), + new ReadConversionCollector()); // Assert - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); Assert.AreEqual("entity", exception.ParamName); } @@ -55,11 +55,11 @@ var entity = new StabilityPointStructuresSectionResultEntity(); // Call - TestDelegate call = () => entity.Read(null, new ReadConversionCollector()); + void Call() => entity.Read(null, new ReadConversionCollector()); // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("sectionResult", paramName); + var exception = Assert.Throws(Call); + Assert.AreEqual("sectionResult", exception.ParamName); } [Test] @@ -69,12 +69,12 @@ var entity = new StabilityPointStructuresSectionResultEntity(); // Call - TestDelegate call = () => entity.Read(new StabilityPointStructuresFailureMechanismSectionResult( - FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null); + void Call() => entity.Read(new StabilityPointStructuresFailureMechanismSectionResult( + FailureMechanismSectionTestFactory.CreateFailureMechanismSection()), null); // Assert - string paramName = Assert.Throws(call).ParamName; - Assert.AreEqual("collector", paramName); + var exception = Assert.Throws(Call); + Assert.AreEqual("collector", exception.ParamName); } [Test] @@ -145,7 +145,7 @@ public void Read_CalculationEntitySet_ReturnStabilityPointStructuresSectionResultWithCalculation() { // Setup - var calculation = new StructuresCalculation(); + var calculation = new StructuresCalculationScenario(); var calculationEntity = new StabilityPointStructuresCalculationEntity(); var collector = new ReadConversionCollector(); Index: Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/RiskeerProjectTestHelper.cs =================================================================== diff -u -red11c91a52b5418784ec7327ee15abb6ddda69a2 -r76b0a3aadce3810c6c6d917957466f439464212d --- Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/RiskeerProjectTestHelper.cs (.../RiskeerProjectTestHelper.cs) (revision ed11c91a52b5418784ec7327ee15abb6ddda69a2) +++ Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/RiskeerProjectTestHelper.cs (.../RiskeerProjectTestHelper.cs) (revision 76b0a3aadce3810c6c6d917957466f439464212d) @@ -576,7 +576,7 @@ Name = "StabilityPoint structures A", Children = { - new StructuresCalculation + new StructuresCalculationScenario { Name = "Calculation 1", Comments = @@ -611,7 +611,7 @@ }, Output = new StructuresOutput(0.11, null) }, - new StructuresCalculation + new StructuresCalculationScenario { Name = "Calculation 2", Comments = @@ -652,7 +652,7 @@ { Name = "StabilityPoint structures B" }); - failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculation()); + failureMechanism.CalculationsGroup.Children.Add(new StructuresCalculationScenario()); } private static void SetSectionResults(IEnumerable sectionResults,