Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs
===================================================================
diff -u -rb19067a9e44fb765a082ccc252bc786827b9e350 -r2f41eb6eb560911cd4ebe2d4d6924c26df911c40
--- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs (.../FailureMechanismEntityReadExtensionsTest.cs) (revision b19067a9e44fb765a082ccc252bc786827b9e350)
+++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Read/FailureMechanismEntityReadExtensionsTest.cs (.../FailureMechanismEntityReadExtensionsTest.cs) (revision 2f41eb6eb560911cd4ebe2d4d6924c26df911c40)
@@ -1475,6 +1475,7 @@
// Assert
Assert.AreEqual(sourcePath, failureMechanism.HeightStructures.SourcePath);
+ Assert.IsEmpty(failureMechanism.HeightStructures);
}
#endregion
Index: Ringtoets/Common/src/Ringtoets.Common.Data/StructureBase.cs
===================================================================
diff -u -rce24d4fc808e32e5cebe7114ab03919770240d07 -r2f41eb6eb560911cd4ebe2d4d6924c26df911c40
--- Ringtoets/Common/src/Ringtoets.Common.Data/StructureBase.cs (.../StructureBase.cs) (revision ce24d4fc808e32e5cebe7114ab03919770240d07)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/StructureBase.cs (.../StructureBase.cs) (revision 2f41eb6eb560911cd4ebe2d4d6924c26df911c40)
@@ -131,7 +131,7 @@
}
Name = fromStructure.Name;
- Location = fromStructure.Location;
+ Location = new Point2D(fromStructure.Location.X, fromStructure.Location.Y);
StructureNormalOrientation = fromStructure.StructureNormalOrientation;
}
Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs
===================================================================
diff -u -r14a2ddce690d976333b925febdd04fb974e08e49 -r2f41eb6eb560911cd4ebe2d4d6924c26df911c40
--- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision 14a2ddce690d976333b925febdd04fb974e08e49)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision 2f41eb6eb560911cd4ebe2d4d6924c26df911c40)
@@ -113,7 +113,6 @@
///
/// The read structure locations.
/// The read structure parameters, grouped by location identifier.
- /// The created structures.
/// Thrown when the validation of the structure fails.
protected abstract void CreateSpecificStructures(ICollection structureLocations,
Dictionary> groupedStructureParameterRows);
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Structures/IStructureUpdateStrategy.cs
===================================================================
diff -u -r8b389428ece343431969fce2e902a7b241f2b372 -r2f41eb6eb560911cd4ebe2d4d6924c26df911c40
--- Ringtoets/Common/src/Ringtoets.Common.IO/Structures/IStructureUpdateStrategy.cs (.../IStructureUpdateStrategy.cs) (revision 8b389428ece343431969fce2e902a7b241f2b372)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Structures/IStructureUpdateStrategy.cs (.../IStructureUpdateStrategy.cs) (revision 2f41eb6eb560911cd4ebe2d4d6924c26df911c40)
@@ -34,7 +34,8 @@
public interface IStructureUpdateStrategy where TStructure : StructureBase
{
///
- /// Adds the imported data to the .
+ /// Updates the and its dependent data with data
+ /// from .
///
/// The target collection which needs to be updated.
/// The imported structures.
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/StructureBaseTest.cs
===================================================================
diff -u -rce24d4fc808e32e5cebe7114ab03919770240d07 -r2f41eb6eb560911cd4ebe2d4d6924c26df911c40
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/StructureBaseTest.cs (.../StructureBaseTest.cs) (revision ce24d4fc808e32e5cebe7114ab03919770240d07)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/StructureBaseTest.cs (.../StructureBaseTest.cs) (revision 2f41eb6eb560911cd4ebe2d4d6924c26df911c40)
@@ -199,24 +199,29 @@
{
Name = "aName",
Id = "anId",
- Location = new Point2D(0, 0)
+ Location = new Point2D(0, 0),
+ StructureNormalOrientation = RoundedDouble.NaN
});
var otherStructure = new TestStructure(new StructureBase.ConstructionProperties
{
Name = "otherName",
Id = "otherId",
- Location = new Point2D(1, 1)
+ Location = new Point2D(1, 1),
+ StructureNormalOrientation = (RoundedDouble) 89
});
// Call
structure.CopyProperties(otherStructure);
// Assert
- Assert.AreNotEqual(structure.Id, otherStructure.Id);
- Assert.AreEqual(structure.Name, otherStructure.Name);
- Assert.AreEqual(structure.Location, otherStructure.Location);
- Assert.AreEqual(structure.StructureNormalOrientation, otherStructure.StructureNormalOrientation);
+ Assert.AreNotEqual(otherStructure.Id, structure.Id);
+ Assert.AreEqual(otherStructure.Name, structure.Name);
+ Assert.AreEqual(otherStructure.Location, structure.Location);
+ Assert.AreEqual(otherStructure.StructureNormalOrientation, structure.StructureNormalOrientation);
+
+ Assert.AreNotSame(otherStructure.Location, structure.Location);
+ Assert.AreNotSame(otherStructure.StructureNormalOrientation, structure.StructureNormalOrientation);
}
[Test]
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs
===================================================================
diff -u -rb6c01797d9fc7112c4106a08c41c82534fe8b62d -r2f41eb6eb560911cd4ebe2d4d6924c26df911c40
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision b6c01797d9fc7112c4106a08c41c82534fe8b62d)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 2f41eb6eb560911cd4ebe2d4d6924c26df911c40)
@@ -100,8 +100,8 @@
Name = RingtoetsCommonFormsResources.StructuresImporter_DisplayName,
Category = RingtoetsCommonFormsResources.Ringtoets_Category,
Image = RingtoetsCommonFormsResources.StructuresIcon,
- IsEnabled = IsHeightStructuresImporterEnabled,
- FileFilterGenerator = HeightStructureFileFilter(),
+ IsEnabled = IsHeightStructuresImportEnabled,
+ FileFilterGenerator = CreateHeightStructureFileFilter(),
CreateFileImporter = (context, filePath) => CreateHeightStructuresImporter(
context, filePath, new ImportMessageProvider(), new HeightStructureReplaceDataStrategy(context.FailureMechanism)),
VerifyUpdates = context => VerifyHeightStructuresShouldUpdate(context, Resources.HeightStructuresPlugin_VerifyHeightStructuresShouldUpdate_When_importing_Calculation_with_Structure_data_output_will_be_cleared_confirm)
@@ -124,8 +124,8 @@
Name = RingtoetsCommonDataResources.StructureCollection_TypeDescriptor,
Category = RingtoetsCommonFormsResources.Ringtoets_Category,
Image = RingtoetsCommonFormsResources.StructuresIcon,
- IsEnabled = IsHeightStructuresImporterEnabled,
- FileFilterGenerator = HeightStructureFileFilter(),
+ IsEnabled = context => context.WrappedData.SourcePath != null,
+ FileFilterGenerator = CreateHeightStructureFileFilter(),
CreateFileImporter = (context, filePath) => CreateHeightStructuresImporter(
context, filePath, new UpdateMessageProvider(), new HeightStructureUpdateDataStrategy(context.FailureMechanism)),
CurrentPath = context => context.WrappedData.SourcePath,
@@ -216,7 +216,7 @@
? Color.FromKnownColor(KnownColor.ControlText)
: Color.FromKnownColor(KnownColor.GrayText),
ChildNodeObjects = context => context.WrappedData.Cast