Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs =================================================================== diff -u -ra20f5008f39cfa4fd6f94572fd07a011f76609f4 -r3c535420f957462c1d525a532dad033434bf2ab7 --- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision a20f5008f39cfa4fd6f94572fd07a011f76609f4) +++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelUpdateDataStrategyTest.cs) (revision 3c535420f957462c1d525a532dad033434bf2ab7) @@ -100,14 +100,14 @@ var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection(); targetCollection.AddRange(new[] { - new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName) + MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(nonUniqueName) }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism()); var importedStochasticSoilModels = new[] { - new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName), - new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName) + MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(nonUniqueName), + MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(nonUniqueName) }; // Call @@ -130,8 +130,8 @@ var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism()); var importedStochasticSoilModels = new[] { - new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName), - new TestMacroStabilityInwardsStochasticSoilModel(nonUniqueName) + MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(nonUniqueName), + MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(nonUniqueName) }; // Call @@ -149,7 +149,7 @@ public void UpdateModelWithImportedData_WithoutCurrentModelAndNoImportedModels_NoChangeNoNotification() { // Setup - IEnumerable importedStochasticSoilModels = Enumerable.Empty(); + IEnumerable importedStochasticSoilModels = Enumerable.Empty(); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(new MacroStabilityInwardsFailureMechanism()); var targetCollection = new MacroStabilityInwardsStochasticSoilModelCollection(); @@ -165,15 +165,15 @@ public void UpdateModelWithImportedData_WithCurrentModelAndImportedModelWithOtherName_ModelReplaced() { // Setup - var existingModel = new TestMacroStabilityInwardsStochasticSoilModel("existing"); + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel("existing"); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); failureMechanism.StochasticSoilModels.AddRange(new[] { existingModel }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(failureMechanism); - var readModel = new TestMacroStabilityInwardsStochasticSoilModel("read"); + MacroStabilityInwardsStochasticSoilModel readModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel("read"); // Call IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new[] @@ -194,7 +194,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -204,7 +204,7 @@ }, sourceFilePath); var strategy = new MacroStabilityInwardsStochasticSoilModelUpdateDataStrategy(failureMechanism); - var readModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel readModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName); // Call IEnumerable affectedObjects = strategy.UpdateModelWithImportedData(new[] @@ -227,7 +227,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -261,7 +261,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -438,7 +438,7 @@ public void UpdateModelWithImportedData_CalculationWithOutputAssignedRemovedSoilModelAndProfile_CalculationUpdatedAndCalculationAndInputReturned() { // Setup - var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(); + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(); var calculation = new MacroStabilityInwardsCalculationScenario(); calculation.InputParameters.StochasticSoilModel = existingModel; calculation.InputParameters.StochasticSoilProfile = existingModel.StochasticSoilProfiles[0]; @@ -474,7 +474,7 @@ { // Setup const string modelsName = "same model"; - var existingModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel existingModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName); var failureMechanism = new MacroStabilityInwardsFailureMechanism(); MacroStabilityInwardsStochasticSoilModelCollection targetCollection = failureMechanism.StochasticSoilModels; @@ -485,7 +485,7 @@ MacroStabilityInwardsStochasticSoilProfile removedProfile = existingModel.StochasticSoilProfiles[0]; MacroStabilityInwardsStochasticSoilProfile unaffectedProfile = existingModel.StochasticSoilProfiles[1]; - MacroStabilityInwardsStochasticSoilModel readModel = new TestMacroStabilityInwardsStochasticSoilModel(modelsName); + MacroStabilityInwardsStochasticSoilModel readModel = MacroStabilityInwardsStochasticSoilModelTestFactory.CreateValidStochasticSoilModel(modelsName); readModel.StochasticSoilProfiles.RemoveAt(0); var calculationWithRemovedProfile = new MacroStabilityInwardsCalculationScenario();