Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs
===================================================================
diff -u -r316e741c3eefe3aab13dd070b56654a6bc4c24f1 -r75c881f5a6ce68ef3fd30bcc15852d68b0bbe941
--- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 316e741c3eefe3aab13dd070b56654a6bc4c24f1)
+++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 75c881f5a6ce68ef3fd30bcc15852d68b0bbe941)
@@ -553,8 +553,7 @@
var soilProfilesImporter = new StochasticSoilModelImporter(pipingFailureMechanism.StochasticSoilModels,
Path.Combine(embeddedResourceFileWriter.TargetFolderPath,
"DR6.soil"),
- new StochasticSoilModelReplaceDataStrategy(),
- new StochasticSoilModelChangeHandler(pipingFailureMechanism));
+ new StochasticSoilModelReplaceDataStrategy());
soilProfilesImporter.Import();
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataImportHelper.cs
===================================================================
diff -u -r316e741c3eefe3aab13dd070b56654a6bc4c24f1 -r75c881f5a6ce68ef3fd30bcc15852d68b0bbe941
--- Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataImportHelper.cs (.../DataImportHelper.cs) (revision 316e741c3eefe3aab13dd070b56654a6bc4c24f1)
+++ Ringtoets/Integration/test/Ringtoets.Integration.TestUtils/DataImportHelper.cs (.../DataImportHelper.cs) (revision 75c881f5a6ce68ef3fd30bcc15852d68b0bbe941)
@@ -212,8 +212,7 @@
var activity = new FileImportActivity(new StochasticSoilModelImporter(
assessmentSection.PipingFailureMechanism.StochasticSoilModels,
filePath,
- new StochasticSoilModelReplaceDataStrategy(),
- new TestStochasticSoilModelChangeHandler()),
+ new StochasticSoilModelReplaceDataStrategy()),
"StochasticSoilModelImporter");
activity.Run();
activity.Finish();
Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Importer/StochasticSoilModelImporter.cs
===================================================================
diff -u -ra59b471e3b6a02319f91b7317b3814a099ef0221 -r75c881f5a6ce68ef3fd30bcc15852d68b0bbe941
--- Ringtoets/Piping/src/Ringtoets.Piping.IO/Importer/StochasticSoilModelImporter.cs (.../StochasticSoilModelImporter.cs) (revision a59b471e3b6a02319f91b7317b3814a099ef0221)
+++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Importer/StochasticSoilModelImporter.cs (.../StochasticSoilModelImporter.cs) (revision 75c881f5a6ce68ef3fd30bcc15852d68b0bbe941)
@@ -30,9 +30,9 @@
using log4net;
using Ringtoets.Piping.Data;
using Ringtoets.Piping.IO.Exceptions;
+using Ringtoets.Piping.IO.Properties;
using Ringtoets.Piping.IO.SoilProfile;
using Ringtoets.Piping.Primitives;
-using Resources = Ringtoets.Piping.IO.Properties.Resources;
using RingtoestCommonIOResources = Ringtoets.Common.IO.Properties.Resources;
namespace Ringtoets.Piping.IO.Importer
@@ -52,76 +52,60 @@
/// The path to the file to import from.
/// The to use
/// when updating the .
- ///
/// Thrown when or
/// is null.
- public StochasticSoilModelImporter(ObservableCollectionWithSourcePath importTarget, string filePath, IStochasticSoilModelUpdateModelStrategy modelUpdateStrategy, IStochasticSoilModelChangeHandler changeHandler)
+ public StochasticSoilModelImporter(ObservableCollectionWithSourcePath importTarget, string filePath, IStochasticSoilModelUpdateModelStrategy modelUpdateStrategy)
: base(filePath, importTarget)
{
if (modelUpdateStrategy == null)
{
throw new ArgumentNullException(nameof(modelUpdateStrategy));
}
- if (changeHandler == null)
- {
- throw new ArgumentNullException(nameof(changeHandler));
- }
this.modelUpdateStrategy = modelUpdateStrategy;
}
protected override void DoPostImportUpdates()
{
- foreach (var observable in UpdatedInstances)
+ foreach (IObservable observable in UpdatedInstances)
{
observable.NotifyObservers();
}
}
protected override bool OnImport()
{
- bool proceedModelImport = ChangeHandler == null || !ChangeHandler.RequireConfirmation();
- if (!proceedModelImport)
+ ReadResult importSoilProfileResult = ReadSoilProfiles();
+ if (importSoilProfileResult.CriticalErrorOccurred || Canceled)
{
- proceedModelImport = ChangeHandler.InquireConfirmation();
+ return false;
}
- if (proceedModelImport)
+
+ ReadResult importStochasticSoilModelResult = ReadStochasticSoilModels();
+ if (importStochasticSoilModelResult.CriticalErrorOccurred || Canceled)
{
- var importSoilProfileResult = ReadSoilProfiles();
- if (importSoilProfileResult.CriticalErrorOccurred || Canceled)
- {
- return false;
- }
+ return false;
+ }
- var importStochasticSoilModelResult = ReadStochasticSoilModels();
- if (importStochasticSoilModelResult.CriticalErrorOccurred || Canceled)
- {
- return false;
- }
+ AddSoilProfilesToStochasticSoilModels(importSoilProfileResult.ImportedItems, importStochasticSoilModelResult.ImportedItems);
+ MergeStochasticSoilProfiles(importStochasticSoilModelResult.ImportedItems);
+ CheckIfAllProfilesAreUsed(importSoilProfileResult.ImportedItems, importStochasticSoilModelResult.ImportedItems);
+ if (Canceled)
+ {
+ return false;
+ }
- AddSoilProfilesToStochasticSoilModels(importSoilProfileResult.ImportedItems, importStochasticSoilModelResult.ImportedItems);
- MergeStochasticSoilProfiles(importStochasticSoilModelResult.ImportedItems);
- CheckIfAllProfilesAreUsed(importSoilProfileResult.ImportedItems, importStochasticSoilModelResult.ImportedItems);
- if (Canceled)
- {
- return false;
- }
+ UpdatedInstances = modelUpdateStrategy.UpdateModelWithImportedData(ImportTarget, GetValidStochasticSoilModels(importStochasticSoilModelResult), FilePath);
- UpdatedInstances = modelUpdateStrategy.UpdateModelWithImportedData(ImportTarget, GetValidStochasticSoilModels(importStochasticSoilModelResult), FilePath);
-
- return true;
- }
- return false;
+ return true;
}
protected override void LogImportCanceledMessage()
{
log.Info(Resources.StochasticSoilModelImporter_Import_Import_canceled);
}
- private IEnumerable UpdatedInstances { get; set; }
+ private IEnumerable UpdatedInstances { get; set; } = Enumerable.Empty();
- public IStochasticSoilModelChangeHandler ChangeHandler { get; set; }
-
///
/// Validate the definition of a .
///
@@ -154,7 +138,7 @@
private IEnumerable GetValidStochasticSoilModels(ReadResult importStochasticSoilModelResult)
{
var currentStep = 1;
- var importedModels = importStochasticSoilModelResult.ImportedItems.ToArray();
+ StochasticSoilModel[] importedModels = importStochasticSoilModelResult.ImportedItems.ToArray();
foreach (StochasticSoilModel importedModel in importedModels)
{
NotifyProgress(RingtoestCommonIOResources.Importer_ProgressText_Adding_imported_data_to_DataModel, currentStep, importedModels.Length);
@@ -176,11 +160,11 @@
private void AddSoilProfilesToStochasticSoilModels(ICollection soilProfiles, ICollection stochasticSoilModels)
{
- foreach (var stochasticSoilModel in stochasticSoilModels)
+ foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModels)
{
- foreach (var stochasticSoilProfile in stochasticSoilModel.StochasticSoilProfiles)
+ foreach (StochasticSoilProfile stochasticSoilProfile in stochasticSoilModel.StochasticSoilProfiles)
{
- var soilProfile = soilProfiles.FirstOrDefault(s => s.SoilProfileType == stochasticSoilProfile.SoilProfileType && s.PipingSoilProfileId == stochasticSoilProfile.SoilProfileId);
+ PipingSoilProfile soilProfile = soilProfiles.FirstOrDefault(s => s.SoilProfileType == stochasticSoilProfile.SoilProfileType && s.PipingSoilProfileId == stochasticSoilProfile.SoilProfileId);
if (soilProfile != null)
{
stochasticSoilProfile.SoilProfile = soilProfile;
@@ -191,10 +175,10 @@
private void MergeStochasticSoilProfiles(ICollection stochasticSoilModels)
{
- foreach (var stochasticSoilModel in stochasticSoilModels)
+ foreach (StochasticSoilModel stochasticSoilModel in stochasticSoilModels)
{
- var profiles = stochasticSoilModel.StochasticSoilProfiles.OrderBy(sp => sp.SoilProfileId).ToArray();
- for (int i = 1; i < profiles.Length; i++)
+ StochasticSoilProfile[] profiles = stochasticSoilModel.StochasticSoilProfiles.OrderBy(sp => sp.SoilProfileId).ToArray();
+ for (var i = 1; i < profiles.Length; i++)
{
StochasticSoilProfile previousProfile = profiles[i - 1];
StochasticSoilProfile currentProfile = profiles[i];
@@ -215,7 +199,7 @@
private void CheckIfAllProfilesAreUsed(ICollection soilProfiles, ICollection stochasticSoilModels)
{
NotifyProgress(Resources.StochasticSoilModelImporter_CheckIfAllProfilesAreUsed_Start_checking_soil_profiles, 1, 1);
- foreach (var soilProfile in soilProfiles.Where(soilProfile => !PipingSoilProfileIsUsed(soilProfile, stochasticSoilModels)))
+ foreach (PipingSoilProfile soilProfile in soilProfiles.Where(soilProfile => !PipingSoilProfileIsUsed(soilProfile, stochasticSoilModels)))
{
log.WarnFormat(Resources.StochasticSoilModelImporter_CheckIfAllProfilesAreUsed_SoilProfile_0_is_not_used_in_any_stochastic_soil_model, soilProfile.Name);
}
@@ -231,8 +215,8 @@
private void HandleException(Exception e)
{
- var message = string.Format(Resources.StochasticSoilModelImporter_CriticalErrorMessage_0_File_Skipped,
- e.Message);
+ string message = string.Format(Resources.StochasticSoilModelImporter_CriticalErrorMessage_0_File_Skipped,
+ e.Message);
log.Error(message);
}
@@ -244,9 +228,7 @@
try
{
using (var stochasticSoilModelReader = new StochasticSoilModelReader(FilePath))
- {
return GetStochasticSoilModelReadResult(stochasticSoilModelReader);
- }
}
catch (CriticalFileReadException e)
{
@@ -257,7 +239,7 @@
private ReadResult GetStochasticSoilModelReadResult(StochasticSoilModelReader stochasticSoilModelReader)
{
- var totalNumberOfSteps = stochasticSoilModelReader.PipingStochasticSoilModelCount;
+ int totalNumberOfSteps = stochasticSoilModelReader.PipingStochasticSoilModelCount;
var currentStep = 1;
var soilModels = new Collection();
@@ -274,7 +256,7 @@
}
catch (StochasticSoilProfileReadException e)
{
- var message = string.Format(Resources.StochasticSoilModelImporter_GetStochasticSoilModelReadResult_Error_0_stochastic_soil_model_skipped, e.Message);
+ string message = string.Format(Resources.StochasticSoilModelImporter_GetStochasticSoilModelReadResult_Error_0_stochastic_soil_model_skipped, e.Message);
log.Error(message);
}
}
@@ -294,9 +276,7 @@
try
{
using (var soilProfileReader = new PipingSoilProfileReader(FilePath))
- {
return GetProfileReadResult(soilProfileReader);
- }
}
catch (CriticalFileReadException e)
{
@@ -307,7 +287,7 @@
private ReadResult GetProfileReadResult(PipingSoilProfileReader soilProfileReader)
{
- var totalNumberOfSteps = soilProfileReader.Count;
+ int totalNumberOfSteps = soilProfileReader.Count;
var currentStep = 1;
var profiles = new Collection();
@@ -324,14 +304,14 @@
}
catch (PipingSoilProfileReadException e)
{
- var message = string.Format(Resources.StochasticSoilModelImporter_ReadSoilProfiles_ParseErrorMessage_0_SoilProfile_skipped,
- e.Message);
+ string message = string.Format(Resources.StochasticSoilModelImporter_ReadSoilProfiles_ParseErrorMessage_0_SoilProfile_skipped,
+ e.Message);
log.Error(message);
}
catch (CriticalFileReadException e)
{
- var message = string.Format(Resources.StochasticSoilModelImporter_CriticalErrorMessage_0_File_Skipped,
- FilePath, e.Message);
+ string message = string.Format(Resources.StochasticSoilModelImporter_CriticalErrorMessage_0_File_Skipped,
+ FilePath, e.Message);
log.Error(message);
return new ReadResult(true);
}
Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs
===================================================================
diff -u -r316e741c3eefe3aab13dd070b56654a6bc4c24f1 -r75c881f5a6ce68ef3fd30bcc15852d68b0bbe941
--- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 316e741c3eefe3aab13dd070b56654a6bc4c24f1)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/PipingPlugin.cs (.../PipingPlugin.cs) (revision 75c881f5a6ce68ef3fd30bcc15852d68b0bbe941)
@@ -119,8 +119,7 @@
IsEnabled = context => context.AssessmentSection.ReferenceLine != null,
CreateFileImporter = (context, filePath) => new StochasticSoilModelImporter(context.WrappedData,
filePath,
- new StochasticSoilModelReplaceDataStrategy(),
- new StochasticSoilModelChangeHandler(context.FailureMechanism))
+ new StochasticSoilModelReplaceDataStrategy())
};
}
@@ -573,8 +572,7 @@
{
var importer = new StochasticSoilModelImporter(soilModelCollection,
sourceFilePath,
- new StochasticSoilModelUpdateDataStrategy(failureMechanism),
- new StochasticSoilModelChangeHandler(failureMechanism));
+ new StochasticSoilModelUpdateDataStrategy(failureMechanism));
var activity = new FileImportActivity(importer, PipingPluginResources.PipingPlugin_RunUpdateStochasticSoilModel_Update_StochasticSoilModels);
ActivityProgressDialogRunner.Run(Gui.MainWindow, activity);
Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/StochasticSoilModelImporterTest.cs
===================================================================
diff -u -ra59b471e3b6a02319f91b7317b3814a099ef0221 -r75c881f5a6ce68ef3fd30bcc15852d68b0bbe941
--- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/StochasticSoilModelImporterTest.cs (.../StochasticSoilModelImporterTest.cs) (revision a59b471e3b6a02319f91b7317b3814a099ef0221)
+++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/StochasticSoilModelImporterTest.cs (.../StochasticSoilModelImporterTest.cs) (revision 75c881f5a6ce68ef3fd30bcc15852d68b0bbe941)
@@ -55,8 +55,7 @@
TestDelegate call = () => new StochasticSoilModelImporter(
null,
"",
- new TestStochasticSoilModelUpdateModelStrategy(),
- new TestStochasticSoilModelChangeHandler());
+ new TestStochasticSoilModelUpdateModelStrategy());
// Assert
string paramName = Assert.Throws(call).ParamName;
@@ -70,30 +69,14 @@
TestDelegate call = () => new StochasticSoilModelImporter(
new ObservableCollectionWithSourcePath(),
"",
- null,
- new TestStochasticSoilModelChangeHandler());
+ null);
// Assert
string paramName = Assert.Throws(call).ParamName;
Assert.AreEqual("modelUpdateStrategy", paramName);
}
[Test]
- public void Constructor_ChangeHandlerNull_ThrowsArgumentNullException()
- {
- // Call
- TestDelegate call = () => new StochasticSoilModelImporter(
- new ObservableCollectionWithSourcePath(),
- "",
- new TestStochasticSoilModelUpdateModelStrategy(),
- null);
-
- // Assert
- string paramName = Assert.Throws(call).ParamName;
- Assert.AreEqual("changeHandler", paramName);
- }
-
- [Test]
public void Constructor_ExpectedValues()
{
var list = new ObservableCollectionWithSourcePath();
@@ -102,8 +85,7 @@
var importer = new StochasticSoilModelImporter(
list,
"",
- new TestStochasticSoilModelUpdateModelStrategy(),
- new TestStochasticSoilModelChangeHandler());
+ new TestStochasticSoilModelUpdateModelStrategy());
// Assert
Assert.IsInstanceOf>>(importer);
@@ -121,8 +103,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
// Precondition
@@ -157,8 +138,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
invalidFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
// Precondition
@@ -182,77 +162,6 @@
}
[Test]
- public void Import_ValidFileConfirmationRequiredButNotGiven_ConfirmationInquiredModelsNotImported()
- {
- // Setup
- string validFilePath = Path.Combine(testDataPath, "complete.soil");
- var updateStrategy = new TestStochasticSoilModelUpdateModelStrategy();
- var importer = new StochasticSoilModelImporter(
- new ObservableCollectionWithSourcePath(),
- validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
-
- var changeHandler = new TestStochasticSoilModelChangeHandler(true);
- importer.ChangeHandler = changeHandler;
-
- // Call
- bool importResult = importer.Import();
-
- // Assert
- Assert.IsTrue(changeHandler.ConfirmationInquired);
- AssertUnsuccessfulImport(importResult, updateStrategy);
- }
-
- [Test]
- public void Import_ValidFileConfirmationRequiredAndGiven_ConfirmationInquiredModelsImported()
- {
- // Setup
- string validFilePath = Path.Combine(testDataPath, "complete.soil");
- var updateStrategy = new TestStochasticSoilModelUpdateModelStrategy();
- var importer = new StochasticSoilModelImporter(
- new ObservableCollectionWithSourcePath(),
- validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
-
- var changeHandler = new TestStochasticSoilModelChangeHandler(true)
- {
- Confirmation = true
- };
- importer.ChangeHandler = changeHandler;
-
- // Call
- bool importResult = importer.Import();
-
- // Assert
- Assert.IsTrue(changeHandler.ConfirmationInquired);
- AssertSuccessfulImport(validFilePath, importResult, updateStrategy);
- }
-
- [Test]
- public void Import_ValidFileConfirmationNotRequired_ConfirmationNotInquiredModelsImported()
- {
- // Setup
- string validFilePath = Path.Combine(testDataPath, "complete.soil");
- var importer = new StochasticSoilModelImporter(
- new ObservableCollectionWithSourcePath(),
- validFilePath,
- new TestStochasticSoilModelUpdateModelStrategy(),
- new TestStochasticSoilModelChangeHandler());
-
- var changeHandler = new TestStochasticSoilModelChangeHandler(false);
- importer.ChangeHandler = changeHandler;
-
- // Call
- bool importResult = importer.Import();
-
- // Assert
- Assert.IsFalse(changeHandler.ConfirmationInquired);
- Assert.IsTrue(importResult);
- }
-
- [Test]
public void Import_ImportingToValidTargetWithValidFile_ImportSoilModelToCollectionAndSourcePathSet()
{
// Setup
@@ -265,8 +174,7 @@
var importer = new StochasticSoilModelImporter(
pipingFailureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged((description, step, steps) =>
progressChangeNotifications.Add(new ProgressNotification(description, step, steps)));
@@ -318,8 +226,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
var importResult = false;
@@ -353,8 +260,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged((description, step, steps) =>
{
if (description.Contains("Inlezen van de D-Soil Model database."))
@@ -388,8 +294,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged((description, step, steps) =>
{
if (description.Contains("Inlezen van de stochastische ondergrondmodellen."))
@@ -423,8 +328,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged((description, step, steps) =>
{
if (description.Contains("Controleren van ondergrondschematisaties."))
@@ -458,8 +362,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged((description, step, steps) =>
{
if (description.Contains("Geïmporteerde data toevoegen aan het toetsspoor."))
@@ -494,8 +397,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged((description, step, steps) => importer.Cancel());
// Precondition
@@ -527,8 +429,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
pathToCorruptFile,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
var importResult = false;
@@ -563,8 +464,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
pathToCorruptFile,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
// Call
@@ -586,8 +486,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
pathToCorruptFile,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
var importResult = false;
@@ -616,8 +515,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
pathToCorruptFile,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
var importResult = false;
@@ -644,8 +542,7 @@
var importer = new StochasticSoilModelImporter(
pipingFailureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
// Call
bool importResult = importer.Import();
@@ -682,8 +579,7 @@
var importer = new StochasticSoilModelImporter(
pipingFailureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
// Call
bool importResult = importer.Import();
@@ -720,8 +616,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
var importResult = false;
@@ -748,8 +643,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
pathToFile,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
var importResult = false;
@@ -780,8 +674,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
pathToFile,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
var importResult = false;
@@ -809,8 +702,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
// Precondition
@@ -868,8 +760,7 @@
var importer = new StochasticSoilModelImporter(
failureMechanism.StochasticSoilModels,
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.SetProgressChanged(IncrementProgress);
// Precondition
@@ -961,8 +852,7 @@
var importer = new StochasticSoilModelImporter(
new ObservableCollectionWithSourcePath(),
validFilePath,
- updateStrategy,
- new TestStochasticSoilModelChangeHandler());
+ updateStrategy);
importer.Import();
// Call
Index: Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/ImportSoilProfileFromDatabaseTest.cs
===================================================================
diff -u -ra59b471e3b6a02319f91b7317b3814a099ef0221 -r75c881f5a6ce68ef3fd30bcc15852d68b0bbe941
--- Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/ImportSoilProfileFromDatabaseTest.cs (.../ImportSoilProfileFromDatabaseTest.cs) (revision a59b471e3b6a02319f91b7317b3814a099ef0221)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Integration.Test/ImportSoilProfileFromDatabaseTest.cs (.../ImportSoilProfileFromDatabaseTest.cs) (revision 75c881f5a6ce68ef3fd30bcc15852d68b0bbe941)
@@ -49,8 +49,7 @@
var importer = new StochasticSoilModelImporter(
pipingFailureMechanism.StochasticSoilModels,
databasePath,
- new StochasticSoilModelReplaceDataStrategy(),
- new TestStochasticSoilModelChangeHandler());
+ new StochasticSoilModelReplaceDataStrategy());
importer.Import();
// Then
@@ -90,8 +89,7 @@
var importer = new StochasticSoilModelImporter(
pipingFailureMechanism.StochasticSoilModels,
databasePath,
- new StochasticSoilModelReplaceDataStrategy(),
- new TestStochasticSoilModelChangeHandler());
+ new StochasticSoilModelReplaceDataStrategy());
importer.Import();
// Then
@@ -127,8 +125,7 @@
var importer = new StochasticSoilModelImporter(
pipingFailureMechanism.StochasticSoilModels,
databasePath,
- new StochasticSoilModelReplaceDataStrategy(),
- new TestStochasticSoilModelChangeHandler());
+ new StochasticSoilModelReplaceDataStrategy());
importer.Import();
// Then