Index: Ringtoets/Migration/test/Ringtoets.Migration.Integration.Test/MigrationTo181IntegrationTest.cs =================================================================== diff -u -r5734662404012bd34c9ceeeaf7fa17a891329849 -rf9f8c1930941084de0b0010b52fc5f76ad2eaa48 --- Ringtoets/Migration/test/Ringtoets.Migration.Integration.Test/MigrationTo181IntegrationTest.cs (.../MigrationTo181IntegrationTest.cs) (revision 5734662404012bd34c9ceeeaf7fa17a891329849) +++ Ringtoets/Migration/test/Ringtoets.Migration.Integration.Test/MigrationTo181IntegrationTest.cs (.../MigrationTo181IntegrationTest.cs) (revision f9f8c1930941084de0b0010b52fc5f76ad2eaa48) @@ -131,6 +131,7 @@ MigratedSerializedDataTestHelper.AssertSerializedPoint2DCollection(reader); AssertClosingStructure(reader, sourceFilePath); + AssertClosingStructureCalculationInput(reader, sourceFilePath); } AssertLogDatabase(logFilePath); @@ -213,6 +214,28 @@ reader.AssertReturnedDataIsValid(validateClosingStructure); } + private static void AssertClosingStructureCalculationInput(MigratedDatabaseReader reader, string sourceFilePath) + { + string validateIdenticalApertures = + $"ATTACH DATABASE \"{sourceFilePath}\" AS SOURCE; " + + "SELECT " + + "SUM([IsInvalid]) = 0 " + + "FROM " + + "( " + + "SELECT " + + "CASE WHEN (NEW.[IdenticalApertures] != OLD.[IdenticalApertures] " + + "AND OLD.[IdenticalApertures] >= 1) " + + "OR (NEW.[IdenticalApertures] != 1 AND OLD.[IdenticalApertures] = 0) " + + "THEN 1 " + + "ELSE 0 " + + "END AS [IsInvalid] " + + "FROM ClosingStructuresCalculationEntity NEW " + + "JOIN [SOURCE].ClosingStructuresCalculationEntity OLD USING (ClosingStructuresCalculationEntityId) " + + "); " + + "DETACH DATABASE SOURCE;"; + reader.AssertReturnedDataIsValid(validateIdenticalApertures); + } + private static void AssertTablesContentMigrated(MigratedDatabaseReader reader, string sourceFilePath) { string[] tables =