Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/test-data/AssessmentSectionProvider/project.risk
===================================================================
diff -u -r5ecfede9bfd5598928f323202e43eecdf47d799b -rd514fb65f72d8055b6a856a0ade7c8cbcdeae632
Binary files differ
Index: Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo212IntegrationTest.cs
===================================================================
diff -u -r24c1df1b88ca1cab3e87583e628d83c3b7510540 -rd514fb65f72d8055b6a856a0ade7c8cbcdeae632
--- Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo212IntegrationTest.cs (.../MigrationTo212IntegrationTest.cs) (revision 24c1df1b88ca1cab3e87583e628d83c3b7510540)
+++ Riskeer/Migration/test/Riskeer.Migration.Integration.Test/MigrationTo212IntegrationTest.cs (.../MigrationTo212IntegrationTest.cs) (revision d514fb65f72d8055b6a856a0ade7c8cbcdeae632)
@@ -101,7 +101,7 @@
AssertStrengthStabilityLengthwiseConstructionFailureMechanismMetaEntity(reader, sourceFilePath);
AssertStandAloneFailureMechanismMetaEntity(reader, sourceFilePath);
-
+
AssertPipingStructureFailureMechanismSectionResults(reader, sourceFilePath);
AssertDuneErosionFailureMechanismSectionResults(reader, sourceFilePath);
AssertStabilityStoneCoverSectionResults(reader, sourceFilePath);
@@ -348,8 +348,90 @@
reader.AssertReturnedDataIsValid(validateFailureMechanismSectionEntity);
}
+ #region WaveConditions
+
+ private static void AssertWaveConditionCalculationOutputs(MigratedDatabaseReader reader)
+ {
+ const string validateOutputQueryFormat =
+ "SELECT COUNT() = 0 " +
+ "FROM [{0}]; ";
+ reader.AssertReturnedDataIsValid(string.Format(validateOutputQueryFormat, "GrassCoverErosionOutwardsWaveConditionsOutputEntity"));
+ reader.AssertReturnedDataIsValid(string.Format(validateOutputQueryFormat, "StabilityStoneCoverWaveConditionsOutputEntity"));
+ reader.AssertReturnedDataIsValid(string.Format(validateOutputQueryFormat, "WaveImpactAsphaltCoverWaveConditionsOutputEntity"));
+ }
+
+ #endregion
+
+ #region MacroStabilityOutwards
+
+ private static void AssertMacroStabilityOutwardsFailureMechanismMetaEntity(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ string validateFailureMechanismEntity =
+ $"ATTACH DATABASE \"{sourceFilePath}\" AS SOURCEPROJECT; " +
+ "SELECT COUNT() = " +
+ "(" +
+ "SELECT COUNT() " +
+ "FROM SOURCEPROJECT.MacroStabilityOutwardsFailureMechanismMetaEntity " +
+ ") " +
+ "FROM MacroStabilityOutwardsFailureMechanismMetaEntity NEW " +
+ "JOIN SOURCEPROJECT.MacroStabilityOutwardsFailureMechanismMetaEntity OLD USING(MacroStabilityOutwardsFailureMechanismMetaEntityId) " +
+ "WHERE NEW.[FailureMechanismEntityId] = OLD.[FailureMechanismEntityId] " +
+ "AND NEW.[A] IS OLD.[A] " +
+ "AND NEW.[ApplyLengthEffectInSection] = 0;" +
+ "DETACH SOURCEPROJECT;";
+
+ reader.AssertReturnedDataIsValid(validateFailureMechanismEntity);
+ }
+
+ #endregion
+
+ #region MacroStabilityInwards
+
+ private static void AssertMacroStabilityInwardsFailureMechanismSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ AssertAdoptableWithProfileProbabilityFailureMechanismSectionResults(reader, "MacroStabilityInwardsSectionResultEntity", sourceFilePath);
+ }
+
+ #endregion
+
+ #region HeightStructures
+
+ private static void AssertHeightStructuresSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ AssertAdoptableFailureMechanismSectionResults(reader, "HeightStructuresSectionResultEntity", sourceFilePath);
+ }
+
+ #endregion
+
+ #region ClosingStructures
+
+ private static void AssertClosingStructuresSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ AssertAdoptableFailureMechanismSectionResults(reader, "ClosingStructuresSectionResultEntity", sourceFilePath);
+ }
+
+ #endregion
+
+ #region StabilityPointStructures
+
+ private static void AssertStabilityPointStructuresSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ AssertAdoptableFailureMechanismSectionResults(reader, "StabilityPointStructuresSectionResultEntity", sourceFilePath);
+ }
+
+ #endregion
+
#region StabilityStoneCover
+ private static void AssertStabilityStoneCoverSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
+ {
+ AssertNonAdoptableWithProfileProbabilityFailureMechanismSectionResults(reader, "StabilityStoneCoverSectionResultEntity", sourceFilePath);
+ }
+
+ #endregion
+
+ #region StabilityStoneCover
+
private static void AssertStabilityStoneCoverFailureMechanismMetaEntity(MigratedDatabaseReader reader, string sourceFilePath)
{
string validateFailureMechanismEntity =
@@ -511,28 +593,14 @@
reader.AssertReturnedDataIsValid(validateOtherCalculations);
}
-
+
private static void AssertWaveImpactAsphaltCoverSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
{
AssertNonAdoptableWithProfileProbabilityFailureMechanismSectionResults(reader, "WaveImpactAsphaltCoverSectionResultEntity", sourceFilePath);
}
#endregion
- #region WaveConditions
-
- private static void AssertWaveConditionCalculationOutputs(MigratedDatabaseReader reader)
- {
- const string validateOutputQueryFormat =
- "SELECT COUNT() = 0 " +
- "FROM [{0}]; ";
- reader.AssertReturnedDataIsValid(string.Format(validateOutputQueryFormat, "GrassCoverErosionOutwardsWaveConditionsOutputEntity"));
- reader.AssertReturnedDataIsValid(string.Format(validateOutputQueryFormat, "StabilityStoneCoverWaveConditionsOutputEntity"));
- reader.AssertReturnedDataIsValid(string.Format(validateOutputQueryFormat, "WaveImpactAsphaltCoverWaveConditionsOutputEntity"));
- }
-
- #endregion
-
#region StandAlone
private static void AssertStrengthStabilityLengthwiseConstructionFailureMechanismMetaEntity(MigratedDatabaseReader reader, string sourceFilePath)
@@ -964,29 +1032,6 @@
#endregion
- #region MacroStabilityOutwards
-
- private static void AssertMacroStabilityOutwardsFailureMechanismMetaEntity(MigratedDatabaseReader reader, string sourceFilePath)
- {
- string validateFailureMechanismEntity =
- $"ATTACH DATABASE \"{sourceFilePath}\" AS SOURCEPROJECT; " +
- "SELECT COUNT() = " +
- "(" +
- "SELECT COUNT() " +
- "FROM SOURCEPROJECT.MacroStabilityOutwardsFailureMechanismMetaEntity " +
- ") " +
- "FROM MacroStabilityOutwardsFailureMechanismMetaEntity NEW " +
- "JOIN SOURCEPROJECT.MacroStabilityOutwardsFailureMechanismMetaEntity OLD USING(MacroStabilityOutwardsFailureMechanismMetaEntityId) " +
- "WHERE NEW.[FailureMechanismEntityId] = OLD.[FailureMechanismEntityId] " +
- "AND NEW.[A] IS OLD.[A] " +
- "AND NEW.[ApplyLengthEffectInSection] = 0;" +
- "DETACH SOURCEPROJECT;";
-
- reader.AssertReturnedDataIsValid(validateFailureMechanismEntity);
- }
-
- #endregion
-
#region DuneErosion
private static void AssertDuneErosionFailureMechanismMetaEntity(MigratedDatabaseReader reader, string sourceFilePath)
@@ -1035,54 +1080,9 @@
{
AssertNonAdoptableFailureMechanismSectionResults(reader, "DuneErosionSectionResultEntity", sourceFilePath);
}
-
- #endregion
- #region MacroStabilityInwards
-
- private static void AssertMacroStabilityInwardsFailureMechanismSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
- {
- AssertAdoptableWithProfileProbabilityFailureMechanismSectionResults(reader, "MacroStabilityInwardsSectionResultEntity", sourceFilePath);
- }
-
#endregion
- #region HeightStructures
-
- private static void AssertHeightStructuresSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
- {
- AssertAdoptableFailureMechanismSectionResults(reader, "HeightStructuresSectionResultEntity", sourceFilePath);
- }
-
- #endregion
-
- #region ClosingStructures
-
- private static void AssertClosingStructuresSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
- {
- AssertAdoptableFailureMechanismSectionResults(reader, "ClosingStructuresSectionResultEntity", sourceFilePath);
- }
-
- #endregion
-
- #region StabilityPointStructures
-
- private static void AssertStabilityPointStructuresSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
- {
- AssertAdoptableFailureMechanismSectionResults(reader, "StabilityPointStructuresSectionResultEntity", sourceFilePath);
- }
-
- #endregion
-
- #region StabilityStoneCover
-
- private static void AssertStabilityStoneCoverSectionResults(MigratedDatabaseReader reader, string sourceFilePath)
- {
- AssertNonAdoptableWithProfileProbabilityFailureMechanismSectionResults(reader, "StabilityStoneCoverSectionResultEntity", sourceFilePath);
- }
-
- #endregion
-
#region FailureMechanismSectionResults
private static void AssertAdoptableFailureMechanismSectionResults(MigratedDatabaseReader reader,
@@ -1159,10 +1159,10 @@
reader.AssertReturnedDataIsValid(validateFailureMechanismSectionResults);
}
-
+
private static void AssertNonAdoptableWithProfileProbabilityFailureMechanismSectionResults(MigratedDatabaseReader reader,
- string failureMechanismSectionResultEntityName,
- string sourceFilePath)
+ string failureMechanismSectionResultEntityName,
+ string sourceFilePath)
{
string validateFailureMechanismSectionResults =
$"ATTACH DATABASE \"{sourceFilePath}\" AS SOURCEPROJECT; " +
Index: Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/FailureMechanismResults/TestNonAdoptableWithProfileProbabilityFailureMechanismSectionResultEntity.cs
===================================================================
diff -u -ra2cb9d8334da2d83cf403720d9af9473fd8a5961 -rd514fb65f72d8055b6a856a0ade7c8cbcdeae632
--- Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/FailureMechanismResults/TestNonAdoptableWithProfileProbabilityFailureMechanismSectionResultEntity.cs (.../TestNonAdoptableWithProfileProbabilityFailureMechanismSectionResultEntity.cs) (revision a2cb9d8334da2d83cf403720d9af9473fd8a5961)
+++ Riskeer/Storage/test/Riskeer.Storage.Core.TestUtil/FailureMechanismResults/TestNonAdoptableWithProfileProbabilityFailureMechanismSectionResultEntity.cs (.../TestNonAdoptableWithProfileProbabilityFailureMechanismSectionResultEntity.cs) (revision d514fb65f72d8055b6a856a0ade7c8cbcdeae632)
@@ -1,5 +1,26 @@
-using Riskeer.Storage.Core.DbContext;
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+using Riskeer.Storage.Core.DbContext;
+
namespace Riskeer.Storage.Core.TestUtil.FailureMechanismResults
{
///
Index: design/DatabaseDesign.eap
===================================================================
diff -u -r39e91a31e125013f4d029236729eb1da4beecdcf -rd514fb65f72d8055b6a856a0ade7c8cbcdeae632
Binary files differ