Index: Ringtoets/Common/src/Ringtoets.Common.Data/UpdateDataStrategies/ReplaceDataStrategyBase.cs
===================================================================
diff -u -r9540d67453c6a1caf5833d64ab651660dce11595 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Common/src/Ringtoets.Common.Data/UpdateDataStrategies/ReplaceDataStrategyBase.cs (.../ReplaceDataStrategyBase.cs) (revision 9540d67453c6a1caf5833d64ab651660dce11595)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/UpdateDataStrategies/ReplaceDataStrategyBase.cs (.../ReplaceDataStrategyBase.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -44,13 +44,17 @@
///
/// The failure mechanism in which the target collection should be updated.
/// The collection that needs to be updated.
- /// Thrown when is null.
+ /// Thrown when any parameter is null.
protected ReplaceDataStrategyBase(TFailureMechanism failureMechanism, ObservableUniqueItemCollectionWithSourcePath targetCollection)
{
if (failureMechanism == null)
{
throw new ArgumentNullException(nameof(failureMechanism));
}
+ if (targetCollection == null)
+ {
+ throw new ArgumentNullException(nameof(targetCollection));
+ }
FailureMechanism = failureMechanism;
this.targetCollection = targetCollection;
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/UpdateDataStrategies/ReplaceDataStrategyBaseTest.cs
===================================================================
diff -u -r9540d67453c6a1caf5833d64ab651660dce11595 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/UpdateDataStrategies/ReplaceDataStrategyBaseTest.cs (.../ReplaceDataStrategyBaseTest.cs) (revision 9540d67453c6a1caf5833d64ab651660dce11595)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/UpdateDataStrategies/ReplaceDataStrategyBaseTest.cs (.../ReplaceDataStrategyBaseTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -33,25 +33,28 @@
[TestFixture]
public class ReplaceDataStrategyBaseTest
{
+
+
[Test]
public void Constructor_FailureMechanismNull_ThrowsArgumentNullException()
{
// Call
- TestDelegate call = () => new ConcreteStrategyClass(null, null);
+ TestDelegate call = () => new ConcreteStrategyClass(null, new TestUniqueItemCollection());
// Assert
string paramName = Assert.Throws(call).ParamName;
Assert.AreEqual("failureMechanism", paramName);
}
[Test]
- public void Constructor_FailureMechanisNotNull_DoesNotThrowException()
+ public void Constructor_TargetCollectionNull_ThrowsArgumentNullException()
{
// Call
TestDelegate call = () => new ConcreteStrategyClass(new TestFailureMechanism(), null);
// Assert
- Assert.DoesNotThrow(call);
+ string paramName = Assert.Throws(call).ParamName;
+ Assert.AreEqual("targetCollection", paramName);
}
[Test]
Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/ForeshoreProfileReplaceDataStrategy.cs
===================================================================
diff -u -r9540d67453c6a1caf5833d64ab651660dce11595 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/ForeshoreProfileReplaceDataStrategy.cs (.../ForeshoreProfileReplaceDataStrategy.cs) (revision 9540d67453c6a1caf5833d64ab651660dce11595)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/FileImporters/ForeshoreProfileReplaceDataStrategy.cs (.../ForeshoreProfileReplaceDataStrategy.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -47,16 +47,11 @@
/// The failure mechanism in which the foreshore
/// profiles are updated.
/// The collection containing the foreshore profiles.
- /// Thrown when
+ /// Thrown when any parameter
/// is null.
public ForeshoreProfileReplaceDataStrategy(IFailureMechanism failureMechanism, ForeshoreProfileCollection foreshoreProfiles)
: base(failureMechanism, foreshoreProfiles)
{
- if (foreshoreProfiles == null)
- {
- throw new ArgumentNullException(nameof(foreshoreProfiles));
- }
-
foreshoreProfileCollection = foreshoreProfiles;
}
Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/ForeshoreProfileReplaceDataStrategyTest.cs
===================================================================
diff -u -ra940166534b3dd6e778de2e7c8e7e5241f3d3381 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/ForeshoreProfileReplaceDataStrategyTest.cs (.../ForeshoreProfileReplaceDataStrategyTest.cs) (revision a940166534b3dd6e778de2e7c8e7e5241f3d3381)
+++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/FileImporters/ForeshoreProfileReplaceDataStrategyTest.cs (.../ForeshoreProfileReplaceDataStrategyTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -58,7 +58,7 @@
// Assert
var exception = Assert.Throws(call);
- Assert.AreEqual("foreshoreProfiles", exception.ParamName);
+ Assert.AreEqual("targetCollection", exception.ParamName);
}
[Test]
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs
===================================================================
diff -u -rd90619dfb54877db8067f27218c45ad4e5dab55d -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision d90619dfb54877db8067f27218c45ad4e5dab55d)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.KernelWrapper/MacroStabilityInwardsCalculatorInput.cs (.../MacroStabilityInwardsCalculatorInput.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -73,7 +73,7 @@
public MacroStabilityInwardsSurfaceLine SurfaceLine { internal get; set; }
///
- /// Gets the profile which contains a 1 dimensional definition of soil layers with properties.
+ /// Gets the profile which contains a definition of soil layers with properties.
///
public MacroStabilityInwardsSoilProfileUnderSurfaceLine SoilProfile { internal get; set; }
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer1D.cs
===================================================================
diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer1D.cs (.../MacroStabilityInwardsSoilLayer1D.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer1D.cs (.../MacroStabilityInwardsSoilLayer1D.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -56,8 +56,11 @@
{
return true;
}
- var other = obj as MacroStabilityInwardsSoilLayer1D;
- return other != null && Equals((MacroStabilityInwardsSoilLayer1D) obj);
+ if (obj.GetType() != GetType())
+ {
+ return false;
+ }
+ return Equals((MacroStabilityInwardsSoilLayer1D) obj);
}
public override int GetHashCode()
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer2D.cs
===================================================================
diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer2D.cs (.../MacroStabilityInwardsSoilLayer2D.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayer2D.cs (.../MacroStabilityInwardsSoilLayer2D.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -77,15 +77,18 @@
{
return true;
}
- var other = obj as MacroStabilityInwardsSoilLayer2D;
- return other != null && Equals((MacroStabilityInwardsSoilLayer2D) obj);
+ if (obj.GetType() != GetType())
+ {
+ return false;
+ }
+ return Equals((MacroStabilityInwardsSoilLayer2D) obj);
}
public override int GetHashCode()
{
unchecked
{
- var hashCode = Properties.GetHashCode();
+ int hashCode = Properties.GetHashCode();
hashCode = (hashCode * 397) ^ OuterRing.GetHashCode();
foreach (Ring hole in Holes)
{
@@ -98,8 +101,8 @@
private bool Equals(MacroStabilityInwardsSoilLayer2D other)
{
return Properties.Equals(other.Properties)
- && OuterRing.Equals(other.OuterRing)
- && Holes.SequenceEqual(other.Holes);
+ && OuterRing.Equals(other.OuterRing)
+ && Holes.SequenceEqual(other.Holes);
}
}
}
\ No newline at end of file
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerProperties.cs
===================================================================
diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerProperties.cs (.../MacroStabilityInwardsSoilLayerProperties.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilLayerProperties.cs (.../MacroStabilityInwardsSoilLayerProperties.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -209,7 +209,7 @@
hashCode = (hashCode * 397) ^ IsAquifer.GetHashCode();
hashCode = (hashCode * 397) ^ Color.GetHashCode();
hashCode = (hashCode * 397) ^ UsePop.GetHashCode();
- hashCode = (hashCode * 397) ^ (int) ShearStrengthModel;
+ hashCode = (hashCode * 397) ^ ShearStrengthModel.GetHashCode();
hashCode = (hashCode * 397) ^ AbovePhreaticLevelMean.GetHashCode();
hashCode = (hashCode * 397) ^ AbovePhreaticLevelDeviation.GetHashCode();
hashCode = (hashCode * 397) ^ BelowPhreaticLevelMean.GetHashCode();
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile1D.cs
===================================================================
diff -u -r140635b34616f25ca853982955976632b6000c52 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile1D.cs (.../MacroStabilityInwardsSoilProfile1D.cs) (revision 140635b34616f25ca853982955976632b6000c52)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile1D.cs (.../MacroStabilityInwardsSoilProfile1D.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -126,7 +126,7 @@
public override string ToString()
{
- return Name ?? string.Empty;
+ return Name;
}
public override bool Equals(object obj)
@@ -139,8 +139,11 @@
{
return true;
}
- var other = obj as MacroStabilityInwardsSoilProfile1D;
- return other != null && Equals((MacroStabilityInwardsSoilProfile1D) obj);
+ if (obj.GetType() != GetType())
+ {
+ return false;
+ }
+ return Equals((MacroStabilityInwardsSoilProfile1D) obj);
}
public override int GetHashCode()
@@ -153,7 +156,7 @@
hashCode = (hashCode * 397) ^ layer.GetHashCode();
}
hashCode = (hashCode * 397) ^ Bottom.GetHashCode();
- hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
+ hashCode = (hashCode * 397) ^ Name.GetHashCode();
return hashCode;
}
}
@@ -189,7 +192,7 @@
///
/// The collection of to validate.
/// Thrown when is null.
- /// Thrown when
+ /// Thrown when:
///
/// - contains no layers
/// - contains a layer with the less than
Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile2D.cs
===================================================================
diff -u -r140635b34616f25ca853982955976632b6000c52 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile2D.cs (.../MacroStabilityInwardsSoilProfile2D.cs) (revision 140635b34616f25ca853982955976632b6000c52)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Primitives/MacroStabilityInwardsSoilProfile2D.cs (.../MacroStabilityInwardsSoilProfile2D.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -91,7 +91,7 @@
public override string ToString()
{
- return Name ?? string.Empty;
+ return Name;
}
public override bool Equals(object obj)
@@ -104,8 +104,11 @@
{
return true;
}
- var other = obj as MacroStabilityInwardsSoilProfile2D;
- return other != null && Equals((MacroStabilityInwardsSoilProfile2D) obj);
+ if (obj.GetType() != GetType())
+ {
+ return false;
+ }
+ return Equals((MacroStabilityInwardsSoilProfile2D) obj);
}
public override int GetHashCode()
@@ -117,7 +120,7 @@
{
hashCode = (hashCode * 397) ^ layer.GetHashCode();
}
- hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
+ hashCode = (hashCode * 397) ^ Name.GetHashCode();
return hashCode;
}
}
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/SoilDatabaseConstraintsReader/missingStochasticSoilModelTable.soil
===================================================================
diff -u -rb5404a5a71bbedaa91bbcc5aee55c690a063aa8d -r42357a100d1a75baca233aa44b866a5009f48e00
Binary files differ
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/SoilDatabaseConstraintsReader/missingStochasticSoilProfileProbability.soil
===================================================================
diff -u -rb5404a5a71bbedaa91bbcc5aee55c690a063aa8d -r42357a100d1a75baca233aa44b866a5009f48e00
Binary files differ
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/SoilDatabaseConstraintsReader/missingStochasticSoilProfileTable.soil
===================================================================
diff -u -rb5404a5a71bbedaa91bbcc5aee55c690a063aa8d -r42357a100d1a75baca233aa44b866a5009f48e00
Binary files differ
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.IO.Test/test-data/SoilDatabaseConstraintsReader/nonUniqueSoilModelNames.soil
===================================================================
diff -u -rb5404a5a71bbedaa91bbcc5aee55c690a063aa8d -r42357a100d1a75baca233aa44b866a5009f48e00
Binary files differ
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs
===================================================================
diff -u -rd619624819b7200ac55b357b0a0c54d198fc20e4 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs) (revision d619624819b7200ac55b357b0a0c54d198fc20e4)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/FileImporter/MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs (.../MacroStabilityInwardsStochasticSoilModelReplaceDataStrategyTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -40,7 +40,7 @@
private const string sourceFilePath = "path";
[Test]
- public void Constructor_WithoutCalculations_CreatesNewInstance()
+ public void Constructor_WithoutFailureMechanism_CreatesNewInstance()
{
// Call
TestDelegate test = () => new MacroStabilityInwardsStochasticSoilModelReplaceDataStrategy(null);
@@ -51,7 +51,7 @@
}
[Test]
- public void Constructor_WithCalculations_CreatesNewInstance()
+ public void Constructor_WithFailureMechanism_CreatesNewInstance()
{
// Call
var strategy = new MacroStabilityInwardsStochasticSoilModelReplaceDataStrategy(new MacroStabilityInwardsFailureMechanism());
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsStochasticSoilModelTreeNodeInfoTest.cs
===================================================================
diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsStochasticSoilModelTreeNodeInfoTest.cs (.../MacroStabilityInwardsStochasticSoilModelTreeNodeInfoTest.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsStochasticSoilModelTreeNodeInfoTest.cs (.../MacroStabilityInwardsStochasticSoilModelTreeNodeInfoTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -78,7 +78,7 @@
}
[Test]
- public void Text_Always_ReturnsTextFromResource()
+ public void Text_Always_ReturnsTextFromStochasticSoilModel()
{
// Setup
const string name = "test test 123";
@@ -94,11 +94,8 @@
[Test]
public void Image_Always_ReturnsSetImage()
{
- // Setup
- var model = new MacroStabilityInwardsStochasticSoilModel("A");
-
// Call
- Image image = info.Image(model);
+ Image image = info.Image(null);
// Assert
TestHelper.AssertImagesAreEqual(FormsResources.StochasticSoilModelIcon, image);
Index: Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsStochasticSoilProfileTreeNodeInfoTest.cs
===================================================================
diff -u -rc85b5e367887a96d602dfb7a0b46073b6eef84da -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsStochasticSoilProfileTreeNodeInfoTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTreeNodeInfoTest.cs) (revision c85b5e367887a96d602dfb7a0b46073b6eef84da)
+++ Ringtoets/MacroStabilityInwards/test/Ringtoets.MacroStabilityInwards.Plugin.Test/TreeNodeInfos/MacroStabilityInwardsStochasticSoilProfileTreeNodeInfoTest.cs (.../MacroStabilityInwardsStochasticSoilProfileTreeNodeInfoTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -77,18 +77,18 @@
}
[Test]
- public void Text_Always_ReturnsName()
+ public void Text_Always_ReturnsSoilProfileName()
{
// Setup
const string testName = "ttt";
- var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(
- 0.1,
- new MacroStabilityInwardsSoilProfile1D(testName, 0, new[]
- {
- new MacroStabilityInwardsSoilLayer1D(10)
- }));
+ var mocks = new MockRepository();
+ var soilProfile = mocks.Stub();
+ soilProfile.Stub(sp => sp.Name).Return(testName);
+ mocks.ReplayAll();
+ var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(0.1, soilProfile);
+
// Call
string text = info.Text(stochasticSoilProfile);
@@ -99,16 +99,8 @@
[Test]
public void Image_Always_ReturnsSetImage()
{
- // Setup
- var stochasticSoilProfile = new MacroStabilityInwardsStochasticSoilProfile(
- 0.1,
- new MacroStabilityInwardsSoilProfile1D("", 0, new[]
- {
- new MacroStabilityInwardsSoilLayer1D(10)
- }));
-
// Call
- Image image = info.Image(stochasticSoilProfile);
+ Image image = info.Image(null);
// Assert
TestHelper.AssertImagesAreEqual(Resources.SoilProfileIcon, image);
Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/SoilProfile/PipingStochasticSoilProfile.cs
===================================================================
diff -u -r1bc56f973fcc27319baaf751468ecbc7c122e7dc -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/SoilProfile/PipingStochasticSoilProfile.cs (.../PipingStochasticSoilProfile.cs) (revision 1bc56f973fcc27319baaf751468ecbc7c122e7dc)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/SoilProfile/PipingStochasticSoilProfile.cs (.../PipingStochasticSoilProfile.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -118,8 +118,7 @@
{
return false;
}
- var other = obj as PipingStochasticSoilProfile;
- return other != null && Equals(other);
+ return Equals((PipingStochasticSoilProfile) obj);
}
public override int GetHashCode()
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingStochasticSoilModelReplaceDataStrategyTest.cs
===================================================================
diff -u -r26f527fb809a2325c8f883ece9da01a8f8040eb3 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingStochasticSoilModelReplaceDataStrategyTest.cs (.../PipingStochasticSoilModelReplaceDataStrategyTest.cs) (revision 26f527fb809a2325c8f883ece9da01a8f8040eb3)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingStochasticSoilModelReplaceDataStrategyTest.cs (.../PipingStochasticSoilModelReplaceDataStrategyTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -40,7 +40,7 @@
private const string sourceFilePath = "path";
[Test]
- public void Constructor_WithoutCalculations_CreatesNewInstance()
+ public void Constructor_WithoutFailureMechanism_CreatesNewInstance()
{
// Call
TestDelegate test = () => new PipingStochasticSoilModelReplaceDataStrategy(null);
@@ -51,7 +51,7 @@
}
[Test]
- public void Constructor_WithCalculations_CreatesNewInstance()
+ public void Constructor_WitFailureMechanism_CreatesNewInstance()
{
// Call
var strategy = new PipingStochasticSoilModelReplaceDataStrategy(new PipingFailureMechanism());
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingStochasticSoilModelTreeNodeInfoTest.cs
===================================================================
diff -u -r26f527fb809a2325c8f883ece9da01a8f8040eb3 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingStochasticSoilModelTreeNodeInfoTest.cs (.../PipingStochasticSoilModelTreeNodeInfoTest.cs) (revision 26f527fb809a2325c8f883ece9da01a8f8040eb3)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingStochasticSoilModelTreeNodeInfoTest.cs (.../PipingStochasticSoilModelTreeNodeInfoTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -77,7 +77,7 @@
}
[Test]
- public void Text_Always_ReturnsTextFromResource()
+ public void Text_Always_ReturnsTextFromStochasticSoilModel()
{
// Setup
const string name = "test test 123";
@@ -93,11 +93,8 @@
[Test]
public void Image_Always_ReturnsSetImage()
{
- // Setup
- var model = new PipingStochasticSoilModel("A");
-
// Call
- Image image = info.Image(model);
+ Image image = info.Image(null);
// Assert
TestHelper.AssertImagesAreEqual(PipingFormsResources.StochasticSoilModelIcon, image);
Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingStochasticSoilProfileTreeNodeInfoTest.cs
===================================================================
diff -u -r140635b34616f25ca853982955976632b6000c52 -r42357a100d1a75baca233aa44b866a5009f48e00
--- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingStochasticSoilProfileTreeNodeInfoTest.cs (.../PipingStochasticSoilProfileTreeNodeInfoTest.cs) (revision 140635b34616f25ca853982955976632b6000c52)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/TreeNodeInfos/PipingStochasticSoilProfileTreeNodeInfoTest.cs (.../PipingStochasticSoilProfileTreeNodeInfoTest.cs) (revision 42357a100d1a75baca233aa44b866a5009f48e00)
@@ -77,7 +77,7 @@
}
[Test]
- public void Text_Always_ReturnsName()
+ public void Text_WithStochasticSoilProfile_ReturnsSoilProfileName()
{
// Setup
const string testName = "ttt";
@@ -94,13 +94,9 @@
[Test]
public void Image_Always_ReturnsSetImage()
{
- // Setup
- var stochasticSoilProfile = new PipingStochasticSoilProfile(0.1,
- PipingSoilProfileTestFactory.CreatePipingSoilProfile());
+ // Call
+ Image image = info.Image(null);
- // Call
- Image image = info.Image(stochasticSoilProfile);
-
// Assert
TestHelper.AssertImagesAreEqual(Resources.PipingSoilProfileIcon, image);
}