Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/DikeProfilesImporterTest.cs =================================================================== diff -u -rfe90a6d174a01975381e6cda55ed1f7f4e831a51 -r31f4ca2b08257cf05459f63e0d715239e3d90c55 --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/DikeProfilesImporterTest.cs (.../DikeProfilesImporterTest.cs) (revision fe90a6d174a01975381e6cda55ed1f7f4e831a51) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/DikeProfilesImporterTest.cs (.../DikeProfilesImporterTest.cs) (revision 31f4ca2b08257cf05459f63e0d715239e3d90c55) @@ -282,7 +282,8 @@ new ProgressNotification("Inlezen van profielgegevens.", 5, 5), new ProgressNotification(expectedAddDataToModelProgressText, 1, 1) }; - ValidateProgressMessages(expectedProgressMessages, progressChangeNotifications); + ProgressNotificationTestHelper.AssertProgressNotificationsAreEqual(expectedProgressMessages, + progressChangeNotifications); Assert.IsTrue(updateDataStrategy.Updated); Assert.AreEqual(5, updateDataStrategy.ReadDikeProfiles.Length); @@ -381,7 +382,9 @@ new ProgressNotification("Inlezen van profielgegevens.", 5, 5), new ProgressNotification(expectedAddDataToModelProgressText, 1, 1) }; - ValidateProgressMessages(expectedProgressMessages, progressChangeNotifications); + ProgressNotificationTestHelper.AssertProgressNotificationsAreEqual(expectedProgressMessages, + progressChangeNotifications); + Assert.IsTrue(updateDataStrategy.Updated); Assert.AreEqual(5, updateDataStrategy.ReadDikeProfiles.Length); } @@ -579,33 +582,5 @@ }); return referenceLine; } - - private static void ValidateProgressMessages(List expectedProgressMessages, - List progressChangeNotifications) - { - Assert.AreEqual(expectedProgressMessages.Count, progressChangeNotifications.Count); - for (var i = 0; i < expectedProgressMessages.Count; i++) - { - ProgressNotification notification = expectedProgressMessages[i]; - ProgressNotification actualNotification = progressChangeNotifications[i]; - Assert.AreEqual(notification.Text, actualNotification.Text); - Assert.AreEqual(notification.CurrentStep, actualNotification.CurrentStep); - Assert.AreEqual(notification.TotalSteps, actualNotification.TotalSteps); - } - } - - private class ProgressNotification - { - public ProgressNotification(string description, int currentStep, int totalSteps) - { - Text = description; - CurrentStep = currentStep; - TotalSteps = totalSteps; - } - - public string Text { get; } - public int CurrentStep { get; } - public int TotalSteps { get; } - } } } \ No newline at end of file