Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs
===================================================================
diff -u -re0dd088a47fdf5b7d7c0612cc586a5e24723133d -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs (.../HeightStructuresDataSynchronizationService.cs) (revision e0dd088a47fdf5b7d7c0612cc586a5e24723133d)
+++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs (.../HeightStructuresDataSynchronizationService.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -75,7 +75,7 @@
}
///
- /// Clears all structures and clears all data that depends on it, either directly or indirectly.
+ /// Removes all structures and clears all data that depends on it, either directly or indirectly.
///
/// The to
/// clear the structures from.
Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationImporter.cs
===================================================================
diff -u -r1a080d1011da380e86370793a7f2ed532a6a0b42 -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationImporter.cs (.../StabilityPointStructuresCalculationConfigurationImporter.cs) (revision 1a080d1011da380e86370793a7f2ed532a6a0b42)
+++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationImporter.cs (.../StabilityPointStructuresCalculationConfigurationImporter.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -32,7 +32,6 @@
using Riskeer.StabilityPointStructures.Data;
using Riskeer.StabilityPointStructures.IO.Configurations.Helpers;
using Riskeer.StabilityPointStructures.IO.Properties;
-using Riskeer.StabilityPointStructures.Util;
using RiskeerCommonIOResources = Riskeer.Common.IO.Properties.Resources;
namespace Riskeer.StabilityPointStructures.IO.Configurations
@@ -49,7 +48,6 @@
private readonly IEnumerable availableHydraulicBoundaryLocations;
private readonly IEnumerable availableForeshoreProfiles;
private readonly IEnumerable availableStructures;
- private readonly StabilityPointStructuresFailureMechanism failureMechanism;
///
/// Create new instance of
@@ -62,15 +60,13 @@
/// the imported objects contain the right foreshore profile.
/// The structures used to check if
/// the imported objects contain the right structure.
- /// The failure mechanism used to propagate changes.
/// Thrown when any input parameter is null.
public StabilityPointStructuresCalculationConfigurationImporter(
string xmlFilePath,
CalculationGroup importTarget,
IEnumerable hydraulicBoundaryLocations,
IEnumerable foreshoreProfiles,
- IEnumerable structures,
- StabilityPointStructuresFailureMechanism failureMechanism)
+ IEnumerable structures)
: base(xmlFilePath, importTarget)
{
if (hydraulicBoundaryLocations == null)
@@ -88,24 +84,11 @@
throw new ArgumentNullException(nameof(structures));
}
- if (failureMechanism == null)
- {
- throw new ArgumentNullException(nameof(failureMechanism));
- }
-
availableHydraulicBoundaryLocations = hydraulicBoundaryLocations;
availableForeshoreProfiles = foreshoreProfiles;
availableStructures = structures;
- this.failureMechanism = failureMechanism;
}
- protected override void DoPostImportUpdates()
- {
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism);
-
- base.DoPostImportUpdates();
- }
-
protected override StabilityPointStructuresCalculationConfigurationReader CreateCalculationConfigurationReader(
string xmlFilePath)
{
Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/FileImporters/StabilityPointStructureUpdateDataStrategy.cs
===================================================================
diff -u -r86594ccd7329d320872573a1d066fe18959d3cea -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/FileImporters/StabilityPointStructureUpdateDataStrategy.cs (.../StabilityPointStructureUpdateDataStrategy.cs) (revision 86594ccd7329d320872573a1d066fe18959d3cea)
+++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/FileImporters/StabilityPointStructureUpdateDataStrategy.cs (.../StabilityPointStructureUpdateDataStrategy.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -29,7 +29,6 @@
using Riskeer.Common.IO.Structures;
using Riskeer.StabilityPointStructures.Data;
using Riskeer.StabilityPointStructures.Service;
-using Riskeer.StabilityPointStructures.Util;
namespace Riskeer.StabilityPointStructures.Plugin.FileImporters
{
@@ -81,8 +80,6 @@
affectedObjects.AddRange(GetAffectedCalculationsWithStabilityPointStructure(structure)
.Select(affectedCalculation => affectedCalculation.InputParameters));
- affectedObjects.AddRange(StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(FailureMechanism));
-
return affectedObjects;
}
Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs
===================================================================
diff -u -r6ba0018b986ebbdcbbcc33538b44fe3a31960ab4 -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 6ba0018b986ebbdcbbcc33538b44fe3a31960ab4)
+++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -56,7 +56,6 @@
using Riskeer.StabilityPointStructures.IO.Configurations;
using Riskeer.StabilityPointStructures.Plugin.FileImporters;
using Riskeer.StabilityPointStructures.Service;
-using Riskeer.StabilityPointStructures.Util;
using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
using RiskeerCommonDataResources = Riskeer.Common.Data.Properties.Resources;
using RiskeerCommonIOResources = Riskeer.Common.IO.Properties.Resources;
@@ -223,8 +222,7 @@
context.WrappedData,
context.AssessmentSection.HydraulicBoundaryDatabase.Locations,
context.AvailableForeshoreProfiles,
- context.AvailableStructures,
- context.FailureMechanism));
+ context.AvailableStructures));
}
public override IEnumerable GetExportInfos()
@@ -619,17 +617,14 @@
if (dialog.SelectedItems.Any())
{
- GenerateStabilityPointStructuresCalculations(
- nodeData.FailureMechanism,
- dialog.SelectedItems.Cast(),
- nodeData.WrappedData.Children);
+ GenerateStabilityPointStructuresCalculations(dialog.SelectedItems.Cast(),
+ nodeData.WrappedData.Children);
nodeData.NotifyObservers();
}
}
}
- private static void GenerateStabilityPointStructuresCalculations(StabilityPointStructuresFailureMechanism failureMechanism,
- IEnumerable structures,
+ private static void GenerateStabilityPointStructuresCalculations(IEnumerable structures,
List calculations)
{
foreach (StabilityPointStructure structure in structures)
@@ -644,8 +639,6 @@
};
calculations.Add(calculation);
}
-
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism);
}
private static void AddCalculation(StabilityPointStructuresCalculationGroupContext context)
@@ -664,8 +657,6 @@
parentGroupContext.WrappedData.Children.Remove(context.WrappedData);
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(context.FailureMechanism);
-
parentGroupContext.NotifyObservers();
}
@@ -769,7 +760,6 @@
if (parentData is StabilityPointStructuresCalculationGroupContext calculationGroupContext)
{
calculationGroupContext.WrappedData.Children.Remove(context.WrappedData);
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(context.FailureMechanism);
calculationGroupContext.NotifyObservers();
}
}
Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Service/StabilityPointStructuresDataSynchronizationService.cs
===================================================================
diff -u -r2977c8e5fa7ebcc99425b1b2deecba881601738b -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Service/StabilityPointStructuresDataSynchronizationService.cs (.../StabilityPointStructuresDataSynchronizationService.cs) (revision 2977c8e5fa7ebcc99425b1b2deecba881601738b)
+++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Service/StabilityPointStructuresDataSynchronizationService.cs (.../StabilityPointStructuresDataSynchronizationService.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -29,7 +29,6 @@
using Riskeer.Common.Data.Structures;
using Riskeer.Common.Service;
using Riskeer.StabilityPointStructures.Data;
-using Riskeer.StabilityPointStructures.Util;
namespace Riskeer.StabilityPointStructures.Service
{
@@ -39,8 +38,7 @@
public static class StabilityPointStructuresDataSynchronizationService
{
///
- /// Clears all structures, unassigns them from the calculations in the
- /// and clears all data that depends on it, either directly or indirectly.
+ /// Removes all structures and clears all data that depends on it, either directly or indirectly.
///
/// The to
/// clear the structures from.
@@ -59,8 +57,7 @@
.Where(c => c.InputParameters.Structure != null)
.ToArray();
- List changedObservables = ClearStructureDependentData(failureMechanism,
- calculationWithRemovedStructure);
+ List changedObservables = ClearStructureDependentData(calculationWithRemovedStructure);
StructureCollection structures = failureMechanism.StabilityPointStructures;
structures.Clear();
@@ -70,8 +67,7 @@
}
///
- /// Removes the given stability point structure and all dependent data, either
- /// directly or indirectly, from the failure mechanism.
+ /// Removes the and clears all dependent data, either directly or indirectly.
///
/// The structure to be removed.
/// The failure mechanism containing .
@@ -97,7 +93,7 @@
.Where(c => ReferenceEquals(c.InputParameters.Structure, structure))
.ToArray();
- List changedObservables = ClearStructureDependentData(failureMechanism, calculationWithRemovedStabilityPointStructure);
+ List changedObservables = ClearStructureDependentData(calculationWithRemovedStabilityPointStructure);
failureMechanism.StabilityPointStructures.Remove(structure);
changedObservables.Add(failureMechanism.StabilityPointStructures);
@@ -207,8 +203,7 @@
return Enumerable.Empty();
}
- private static List ClearStructureDependentData(StabilityPointStructuresFailureMechanism failureMechanism,
- IEnumerable> calculationWithRemovedStructure)
+ private static List ClearStructureDependentData(IEnumerable> calculationWithRemovedStructure)
{
var changedObservables = new List();
foreach (StructuresCalculation calculation in calculationWithRemovedStructure)
@@ -219,10 +214,6 @@
changedObservables.Add(calculation.InputParameters);
}
- IEnumerable affectedSectionResults =
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism);
-
- changedObservables.AddRange(affectedSectionResults);
return changedObservables;
}
}
Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationImporterTest.cs
===================================================================
diff -u -r1a080d1011da380e86370793a7f2ed532a6a0b42 -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationImporterTest.cs (.../StabilityPointStructuresCalculationConfigurationImporterTest.cs) (revision 1a080d1011da380e86370793a7f2ed532a6a0b42)
+++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationImporterTest.cs (.../StabilityPointStructuresCalculationConfigurationImporterTest.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -476,7 +476,7 @@
// Call
var importer = new StabilityPointStructuresCalculationConfigurationImporter(
"", new CalculationGroup(), Enumerable.Empty(), Enumerable.Empty(),
- Enumerable.Empty(), new StabilityPointStructuresFailureMechanism());
+ Enumerable.Empty());
// Assert
Assert.IsInstanceOf new StabilityPointStructuresCalculationConfigurationImporter(
"", new CalculationGroup(), null, Enumerable.Empty(),
- Enumerable.Empty(), new StabilityPointStructuresFailureMechanism());
+ Enumerable.Empty());
// Assert
var exception = Assert.Throws(Call);
@@ -502,7 +502,7 @@
// Call
void Call() => new StabilityPointStructuresCalculationConfigurationImporter(
"", new CalculationGroup(), Enumerable.Empty(), null,
- Enumerable.Empty(), new StabilityPointStructuresFailureMechanism());
+ Enumerable.Empty());
// Assert
var exception = Assert.Throws(Call);
@@ -515,27 +515,14 @@
// Call
void Call() => new StabilityPointStructuresCalculationConfigurationImporter(
"", new CalculationGroup(), Enumerable.Empty(),
- Enumerable.Empty(), null, new StabilityPointStructuresFailureMechanism());
+ Enumerable.Empty(), null);
// Assert
var exception = Assert.Throws(Call);
Assert.AreEqual("structures", exception.ParamName);
}
[Test]
- public void Constructor_FailureMechanismNull_ThrowArgumentNullException()
- {
- // Call
- void Call() => new StabilityPointStructuresCalculationConfigurationImporter(
- "", new CalculationGroup(), Enumerable.Empty(),
- Enumerable.Empty(), Enumerable.Empty(), null);
-
- // Assert
- var exception = Assert.Throws(Call);
- Assert.AreEqual("failureMechanism", exception.ParamName);
- }
-
- [Test]
[SetCulture("nl-NL")]
[TestCaseSource(nameof(ValidConfigurationInvalidData))]
public void Import_ValidConfigurationInvalidData_LogMessageAndContinueImport(string file, string expectedErrorMessage)
@@ -558,8 +545,7 @@
new StabilityPointStructure[]
{
structure
- },
- new StabilityPointStructuresFailureMechanism());
+ });
var successful = false;
// Call
@@ -588,8 +574,7 @@
{
foreshoreProfile
},
- Enumerable.Empty(),
- new StabilityPointStructuresFailureMechanism());
+ Enumerable.Empty());
var successful = false;
@@ -621,8 +606,7 @@
{
structure,
new TestStabilityPointStructure("other structure")
- },
- new StabilityPointStructuresFailureMechanism());
+ });
// Call
bool successful = importer.Import();
@@ -743,8 +727,7 @@
{
structure,
new TestStabilityPointStructure("other structure")
- },
- new StabilityPointStructuresFailureMechanism());
+ });
// Call
bool successful = importer.Import();
@@ -856,8 +839,7 @@
new[]
{
structure
- },
- new StabilityPointStructuresFailureMechanism());
+ });
var expectedCalculation = new StructuresCalculationScenario
{
@@ -903,15 +885,14 @@
{
structure,
new TestStabilityPointStructure("other structure")
- },
- new StabilityPointStructuresFailureMechanism());
+ });
// Call
var successful = false;
- Action call = () => successful = importer.Import();
+ void Call() => successful = importer.Import();
// Assert
- TestHelper.AssertLogMessageIsGenerated(call, $"Gegevens zijn geïmporteerd vanuit bestand '{filePath}'.", 1);
+ TestHelper.AssertLogMessageIsGenerated(Call, $"Gegevens zijn geïmporteerd vanuit bestand '{filePath}'.", 1);
Assert.IsTrue(successful);
var expectedCalculation = new StructuresCalculationScenario
{
@@ -1065,8 +1046,7 @@
new[]
{
structure
- },
- new StabilityPointStructuresFailureMechanism());
+ });
// Call
bool successful = importer.Import();
@@ -1080,53 +1060,6 @@
Assert.AreEqual(expectedValue, calculation.InputParameters.ProbabilityCollisionSecondaryStructure);
}
- [Test]
- public void DoPostImport_CalculationWithStructureInSection_AssignsCalculationToSectionResult()
- {
- // Setup
- string filePath = Path.Combine(importerPath, "validConfigurationFullCalculation.xml");
- var calculationGroup = new CalculationGroup();
-
- var failureMechanism = new StabilityPointStructuresFailureMechanism();
-
- FailureMechanismTestHelper.SetSections(failureMechanism, new[]
- {
- FailureMechanismSectionTestFactory.CreateFailureMechanismSection(new[]
- {
- new Point2D(0, 0),
- new Point2D(10, 10)
- })
- });
-
- var calculation = new StructuresCalculation
- {
- InputParameters =
- {
- Structure = new TestStabilityPointStructure(new Point2D(5, 5))
- }
- };
- failureMechanism.CalculationsGroup.Children.Add(
- calculation);
-
- var importer = new StabilityPointStructuresCalculationConfigurationImporter(
- filePath,
- calculationGroup,
- Enumerable.Empty(),
- Enumerable.Empty(),
- Enumerable.Empty(),
- failureMechanism);
-
- // Preconditions
- Assert.AreEqual(1, failureMechanism.SectionResults.Count());
- Assert.IsNull(failureMechanism.SectionResults.ElementAt(0).Calculation);
-
- // Call
- importer.DoPostImport();
-
- // Assert
- Assert.AreSame(calculation, failureMechanism.SectionResults.ElementAt(0).Calculation);
- }
-
[TestCase("validConfigurationUnknownForeshoreProfile.xml",
"Het voorlandprofiel met ID 'unknown' bestaat niet.",
TestName = "Import_UnknownData({0:80})")]
@@ -1147,16 +1080,15 @@
calculationGroup,
Enumerable.Empty(),
Enumerable.Empty(),
- Enumerable.Empty(),
- new StabilityPointStructuresFailureMechanism());
+ Enumerable.Empty());
var successful = false;
// Call
- Action call = () => successful = importer.Import();
+ void Call() => successful = importer.Import();
// Assert
string expectedMessage = $"{expectedErrorMessage} Berekening 'Berekening 1' is overgeslagen.";
- TestHelper.AssertLogMessageWithLevelIsGenerated(call, Tuple.Create(expectedMessage, LogLevelConstant.Error), 2);
+ TestHelper.AssertLogMessageWithLevelIsGenerated(Call, Tuple.Create(expectedMessage, LogLevelConstant.Error), 2);
Assert.IsTrue(successful);
CollectionAssert.IsEmpty(calculationGroup.Children);
}
Index: Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs
===================================================================
diff -u -rb0021e52ef17e3101d6e7089e3052ceb4621f3fe -rea06e6df1e6d80ada3d023ba1acf2f29a20159d9
--- Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs (.../StabilityPointStructuresUpdateDataStrategyTest.cs) (revision b0021e52ef17e3101d6e7089e3052ceb4621f3fe)
+++ Riskeer/StabilityPointStructures/test/Riskeer.StabilityPointStructures.Plugin.Test/FileImporters/StabilityPointStructuresUpdateDataStrategyTest.cs (.../StabilityPointStructuresUpdateDataStrategyTest.cs) (revision ea06e6df1e6d80ada3d023ba1acf2f29a20159d9)
@@ -34,7 +34,6 @@
using Riskeer.StabilityPointStructures.Data;
using Riskeer.StabilityPointStructures.Data.TestUtil;
using Riskeer.StabilityPointStructures.Plugin.FileImporters;
-using Riskeer.StabilityPointStructures.Util;
namespace Riskeer.StabilityPointStructures.Plugin.Test.FileImporters
{
@@ -47,10 +46,10 @@
public void Constructor_FailureMechanismNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => new StabilityPointStructureUpdateDataStrategy(null);
+ void Call() => new StabilityPointStructureUpdateDataStrategy(null);
// Assert
- var exception = Assert.Throws(call);
+ var exception = Assert.Throws(Call);
Assert.AreEqual("failureMechanism", exception.ParamName);
}
@@ -76,12 +75,11 @@
var strategy = new StabilityPointStructureUpdateDataStrategy(new StabilityPointStructuresFailureMechanism());
// Call
- TestDelegate test = () => strategy.UpdateStructuresWithImportedData(null,
- string.Empty);
+ void Call() => strategy.UpdateStructuresWithImportedData(null, string.Empty);
// Assert
- string paramName = Assert.Throws(test).ParamName;
- Assert.AreEqual("importedDataCollection", paramName);
+ var exception = Assert.Throws(Call);
+ Assert.AreEqual("importedDataCollection", exception.ParamName);
}
[Test]
@@ -91,12 +89,11 @@
var strategy = new StabilityPointStructureUpdateDataStrategy(new StabilityPointStructuresFailureMechanism());
// Call
- TestDelegate test = () => strategy.UpdateStructuresWithImportedData(Enumerable.Empty(),
- null);
+ void Call() => strategy.UpdateStructuresWithImportedData(Enumerable.Empty(), null);
// Assert
- string paramName = Assert.Throws(test).ParamName;
- Assert.AreEqual("sourceFilePath", paramName);
+ var exception = Assert.Throws(Call);
+ Assert.AreEqual("sourceFilePath", exception.ParamName);
}
[Test]
@@ -114,11 +111,10 @@
var strategy = new StabilityPointStructureUpdateDataStrategy(new StabilityPointStructuresFailureMechanism());
// Call
- TestDelegate call = () => strategy.UpdateStructuresWithImportedData(readStructures,
- sourceFilePath);
+ void Call() => strategy.UpdateStructuresWithImportedData(readStructures, sourceFilePath);
// Assert
- var exception = Assert.Throws(call);
+ var exception = Assert.Throws(Call);
const string expectedMessage = "Geïmporteerde data moet unieke elementen bevatten.";
Assert.AreEqual(expectedMessage, exception.Message);
@@ -632,15 +628,8 @@
})
});
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism);
- StabilityPointStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray();
-
var strategy = new StabilityPointStructureUpdateDataStrategy(failureMechanism);
- // Precondition
- Assert.AreSame(calculation, sectionResults[0].Calculation);
- Assert.IsNull(sectionResults[1].Calculation);
-
// Call
IEnumerable affectedObjects = strategy.UpdateStructuresWithImportedData(new[]
{
@@ -655,15 +644,8 @@
{
failureMechanism.StabilityPointStructures,
structure,
- calculation.InputParameters,
- sectionResults[0],
- sectionResults[1]
+ calculation.InputParameters
}, affectedObjects);
-
- sectionResults = failureMechanism.SectionResults.ToArray();
- Assert.AreEqual(2, sectionResults.Length);
- Assert.IsNull(sectionResults[0].Calculation);
- Assert.AreSame(calculation, sectionResults[1].Calculation);
}
[Test]
@@ -705,15 +687,8 @@
})
});
- StabilityPointStructuresHelper.UpdateCalculationToSectionResultAssignments(failureMechanism);
- StabilityPointStructuresFailureMechanismSectionResult[] sectionResults = failureMechanism.SectionResults.ToArray();
-
var strategy = new StabilityPointStructureUpdateDataStrategy(failureMechanism);
- // Precondition
- Assert.AreEqual(1, sectionResults.Length);
- Assert.AreSame(calculation, sectionResults[0].Calculation);
-
// Call
IEnumerable affectedObjects = strategy.UpdateStructuresWithImportedData(Enumerable.Empty(),
sourceFilePath);
@@ -723,12 +698,7 @@
{
failureMechanism.StabilityPointStructures,
calculation.InputParameters,
- sectionResults[0]
}, affectedObjects);
-
- sectionResults = failureMechanism.SectionResults.ToArray();
- Assert.AreEqual(1, sectionResults.Length);
- Assert.IsNull(sectionResults[0].Calculation);
}
private static void AssertStabilityPointStructure(StabilityPointStructure expectedStabilityPointStructure,