Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -reabf1a800431a23b06c8d81dfbf0f46a71bb659b -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision eabf1a800431a23b06c8d81dfbf0f46a71bb659b) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -588,7 +588,7 @@ failureMechanism.HeightStructures.AddRange(new[] { heightStructure, - new TestHeightStructure("Structure B", "IdB") + new TestHeightStructure("IdB", "Structure B") }, @"/temp/structures"); ForeshoreProfile foreshoreProfile = failureMechanism.ForeshoreProfiles[0]; Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureTest.cs =================================================================== diff -u -reabf1a800431a23b06c8d81dfbf0f46a71bb659b -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureTest.cs (.../TestClosingStructureTest.cs) (revision eabf1a800431a23b06c8d81dfbf0f46a71bb659b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/TestClosingStructureTest.cs (.../TestClosingStructureTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -61,14 +61,14 @@ } [Test] - public void Constructor_WithStructureNameAndId_ExpectedValues() + public void Constructor_WithStructureIdAndName_ExpectedValues() { // Setup - const string name = ""; const string id = ""; + const string name = ""; // Call - var structure = new TestClosingStructure(name, id); + var structure = new TestClosingStructure(id, name); // Assert Assert.IsInstanceOf(structure); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructure.cs =================================================================== diff -u -reabf1a800431a23b06c8d81dfbf0f46a71bb659b -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructure.cs (.../TestClosingStructure.cs) (revision eabf1a800431a23b06c8d81dfbf0f46a71bb659b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil/TestClosingStructure.cs (.../TestClosingStructure.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -48,11 +48,11 @@ /// /// Creates a new instance of . /// - /// The name of the structure. /// The id of the structure. + /// The name of the structure. /// Thrown when /// or is null, empty or consists of only whitespaces. - public TestClosingStructure(string name, string id) + public TestClosingStructure(string id, string name) : this(name, id, new Point2D(12345.56789, 9876.54321), ClosingStructureInflowModelType.VerticalWall) { } /// Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructureTreeNodeInfoTest.cs =================================================================== diff -u -reabf1a800431a23b06c8d81dfbf0f46a71bb659b -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructureTreeNodeInfoTest.cs (.../ClosingStructureTreeNodeInfoTest.cs) (revision eabf1a800431a23b06c8d81dfbf0f46a71bb659b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructureTreeNodeInfoTest.cs (.../ClosingStructureTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -94,7 +94,7 @@ // Setup mocks.ReplayAll(); const string name = "very nice name!"; - ClosingStructure structure = new TestClosingStructure(name, "id"); + ClosingStructure structure = new TestClosingStructure("id", name); // Call string text = info.Text(structure); Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -reabf1a800431a23b06c8d81dfbf0f46a71bb659b -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision eabf1a800431a23b06c8d81dfbf0f46a71bb659b) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Plugin.Test/TreeNodeInfos/ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../ClosingStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -1014,7 +1014,7 @@ var assessmentSection = mocks.Stub(); const string existingCalculationName = "Closing structure"; - ClosingStructure closingStructure = new TestClosingStructure(existingCalculationName, "id"); + ClosingStructure closingStructure = new TestClosingStructure("id", existingCalculationName); var failureMechanism = new ClosingStructuresFailureMechanism { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/TestHeightStructureTest.cs =================================================================== diff -u -rc1594afa56f02899bd122fc4fd4ccf4d76b236b7 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/TestHeightStructureTest.cs (.../TestHeightStructureTest.cs) (revision c1594afa56f02899bd122fc4fd4ccf4d76b236b7) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil.Test/TestHeightStructureTest.cs (.../TestHeightStructureTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -36,10 +36,7 @@ var heightStructure = new TestHeightStructure(); // Assert - const string expectedName = "Test"; - const string expectedId = "Id"; - var expectedLocation = new Point2D(0, 0); - AssertTestHeightStructure(heightStructure, expectedName, expectedId, expectedLocation); + AssertTestHeightStructure(heightStructure, "name", "id", new Point2D(0, 0)); } [Test] @@ -52,9 +49,7 @@ var heightStructure = new TestHeightStructure(customLocation); // Assert - const string expectedName = "Test"; - const string expectedId = "Id"; - AssertTestHeightStructure(heightStructure, expectedName, expectedId, customLocation); + AssertTestHeightStructure(heightStructure, "name", "id", customLocation); } [Test] @@ -68,34 +63,32 @@ var heightStructure = new TestHeightStructure(customLocation, customId); // Assert - const string expectedName = "Test"; - AssertTestHeightStructure(heightStructure, expectedName, customId, customLocation); + AssertTestHeightStructure(heightStructure, "name", customId, customLocation); } [Test] - public void Constructor_CustomName_ExpectedValues() + public void Constructor_CustomId_ExpectedValues() { // Setup - const string customName = "A different name for structure"; + const string customId = "A different id"; // Call - var heightStructure = new TestHeightStructure(customName); + var heightStructure = new TestHeightStructure(customId); // Assert - const string expectedId = "Id"; var expectedLocation = new Point2D(0, 0); - AssertTestHeightStructure(heightStructure, customName, expectedId, expectedLocation); + AssertTestHeightStructure(heightStructure, "name", customId, expectedLocation); } [Test] - public void Constructor_CustomNameAndId_ExpectedValues() + public void Constructor_CustomIdAndName_ExpectedValues() { // Setup const string customName = "A different name for structure"; const string customId = "A different id for structure"; // Call - var heightStructure = new TestHeightStructure(customName, customId); + var heightStructure = new TestHeightStructure(customId, customName); // Assert var expectedLocation = new Point2D(0, 0); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/TestHeightStructure.cs =================================================================== diff -u -r6b18e2c0134c97e01ba13c518fb7a8efa7f42253 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/TestHeightStructure.cs (.../TestHeightStructure.cs) (revision 6b18e2c0134c97e01ba13c518fb7a8efa7f42253) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Data.TestUtil/TestHeightStructure.cs (.../TestHeightStructure.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -34,25 +34,25 @@ /// Creates a new instance of . /// public TestHeightStructure() - : this("Test") {} + : this("id") {} /// /// Creates a new instance of . /// - /// The name of the structure. - /// Thrown when + /// The name of the structure. + /// Thrown when /// is null, empty or consists of only whitespaces. - public TestHeightStructure(string name) - : this(name, "Id", new Point2D(0.0, 0.0)) {} + public TestHeightStructure(string id) + : this("name", id, new Point2D(0.0, 0.0)) {} /// /// Creates a new instance of . /// - /// The name of the structure. /// The id of the structure. + /// The name of the structure. /// Thrown when /// or is null, empty or consists of only whitespaces. - public TestHeightStructure(string name, string id) + public TestHeightStructure(string id, string name) : this(name, id, new Point2D(0.0, 0.0)) {} /// @@ -62,7 +62,7 @@ /// Thrown when /// is null. public TestHeightStructure(Point2D location) - : this("Test", "Id", location) {} + : this("name", "id", location) {} /// /// Creates a new instance of . @@ -74,7 +74,7 @@ /// Thrown when /// is null, empty or consists of only whitespaces. public TestHeightStructure(Point2D location, string id) - : this("Test", id, location) {} + : this("name", id, location) {} /// /// Creates a new instance of . Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureReplaceDataStrategyTest.cs =================================================================== diff -u -r4954f3a3c5eab3aff1b2d4c5a58364f06fe4bbd2 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureReplaceDataStrategyTest.cs (.../HeightStructureReplaceDataStrategyTest.cs) (revision 4954f3a3c5eab3aff1b2d4c5a58364f06fe4bbd2) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureReplaceDataStrategyTest.cs (.../HeightStructureReplaceDataStrategyTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -174,10 +174,10 @@ var failureMechanism = new HeightStructuresFailureMechanism(); failureMechanism.HeightStructures.AddRange(new[] { - new TestHeightStructure("Original", "id") + new TestHeightStructure("id", "Original") }, sourceFilePath); - var importedStructure = new TestHeightStructure("Imported", "Different id"); + var importedStructure = new TestHeightStructure("Different id", "Imported"); var strategy = new HeightStructureReplaceDataStrategy(failureMechanism); @@ -315,8 +315,8 @@ const string duplicateId = "I am a duplicate id"; HeightStructure[] importedHeightStructures = { - new TestHeightStructure("name", duplicateId), - new TestHeightStructure("Other name", duplicateId) + new TestHeightStructure(duplicateId, "name"), + new TestHeightStructure(duplicateId, "Other name") }; var targetCollection = new StructureCollection(); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs =================================================================== diff -u -r8980db4ffba26defbde335c001e559f1e8d0c1d0 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs (.../HeightStructureUpdateDataStrategyTest.cs) (revision 8980db4ffba26defbde335c001e559f1e8d0c1d0) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/FileImporters/HeightStructureUpdateDataStrategyTest.cs (.../HeightStructureUpdateDataStrategyTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -51,15 +51,15 @@ get { var random = new Random(532); - const string defaultName = "Test"; - const string defaultId = "Id"; + const string defaultId = "id"; + const string defaultName = "name"; var defaultLocation = new Point2D(0, 0); - yield return new TestCaseData(new TestHeightStructure("Different name")) + yield return new TestCaseData(new TestHeightStructure(defaultId, "Different name")) .SetName("Different name"); - yield return new TestCaseData(new TestHeightStructure(new Point2D(1, 1))) + yield return new TestCaseData(new TestHeightStructure(new Point2D(1, 1), defaultId)) .SetName("Different Location"); - yield return new TestCaseData(new TestHeightStructure(defaultName) + yield return new TestCaseData(new TestHeightStructure { AllowedLevelIncreaseStorage = { @@ -68,15 +68,15 @@ StandardDeviation = random.NextRoundedDouble() } }).SetName("Different AllowedLevelIncreaseStorage"); - yield return new TestCaseData(new TestHeightStructure(defaultName) + yield return new TestCaseData(new TestHeightStructure { CriticalOvertoppingDischarge = { Mean = (RoundedDouble) random.Next(), CoefficientOfVariation = random.NextRoundedDouble() } }).SetName("Different CriticalOvertoppingDischarge"); - yield return new TestCaseData(new TestHeightStructure(defaultName) + yield return new TestCaseData(new TestHeightStructure { FlowWidthAtBottomProtection = { @@ -85,23 +85,23 @@ StandardDeviation = random.NextRoundedDouble() } }).SetName("Different FlowWidthAtBottomProtection"); - yield return new TestCaseData(new TestHeightStructure(defaultName) + yield return new TestCaseData(new TestHeightStructure { LevelCrestStructure = { Mean = (RoundedDouble) random.Next(), StandardDeviation = random.NextRoundedDouble() } }).SetName("Different LevelCrestStructure"); - yield return new TestCaseData(new TestHeightStructure(defaultName) + yield return new TestCaseData(new TestHeightStructure { StorageStructureArea = { Mean = (RoundedDouble) random.Next(), CoefficientOfVariation = random.NextRoundedDouble() } }).SetName("Different StorageStructureArea"); - yield return new TestCaseData(new TestHeightStructure(defaultName) + yield return new TestCaseData(new TestHeightStructure { WidthFlowApertures = { @@ -222,8 +222,8 @@ const string duplicateId = "I am a duplicate id"; var readStructures = new[] { - new TestHeightStructure("Structure", duplicateId), - new TestHeightStructure("Other structure", duplicateId) + new TestHeightStructure(duplicateId, "Structure"), + new TestHeightStructure(duplicateId, "Other structure") }; var targetCollection = new StructureCollection(); @@ -250,7 +250,7 @@ { // Setup const string duplicateId = "I am a duplicate id"; - var expectedStructure = new TestHeightStructure("expectedStructure", duplicateId); + var expectedStructure = new TestHeightStructure(duplicateId, "expectedStructure"); var expectedCollection = new[] { @@ -262,8 +262,8 @@ var readStructures = new[] { - new TestHeightStructure("Structure", duplicateId), - new TestHeightStructure("Other structure", duplicateId) + new TestHeightStructure(duplicateId, "Structure"), + new TestHeightStructure(duplicateId, "Other structure") }; var strategy = new HeightStructureUpdateDataStrategy(new HeightStructuresFailureMechanism()); @@ -291,8 +291,8 @@ StructureCollection structures = failureMechanism.HeightStructures; structures.AddRange(new[] { - new TestHeightStructure("name", "id"), - new TestHeightStructure("other name", "other id") + new TestHeightStructure("id", "name"), + new TestHeightStructure("other id", "other name") }, sourceFilePath); var strategy = new HeightStructureUpdateDataStrategy(failureMechanism); @@ -344,8 +344,8 @@ { // Setup const string sameId = "sameId"; - HeightStructure readStructure = new TestHeightStructure("new structure", sameId); - HeightStructure structure = new TestHeightStructure("original structure", sameId); + HeightStructure readStructure = new TestHeightStructure(sameId, "new structure"); + HeightStructure structure = new TestHeightStructure(sameId, "original structure"); var calculation = new TestHeightStructuresCalculation { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructureTreeNodeInfoTest.cs =================================================================== diff -u -r20e9bfea15dfe132ee137283a9f24bc4c413ce4a -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructureTreeNodeInfoTest.cs (.../HeightStructureTreeNodeInfoTest.cs) (revision 20e9bfea15dfe132ee137283a9f24bc4c413ce4a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructureTreeNodeInfoTest.cs (.../HeightStructureTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -94,7 +94,7 @@ // Setup mocks.ReplayAll(); const string name = "very nice name!"; - HeightStructure structure = new TestHeightStructure(name); + HeightStructure structure = new TestHeightStructure("id", name); // Call string text = info.Text(structure); @@ -254,7 +254,7 @@ using (var treeViewControl = new TreeViewControl()) { - HeightStructure nodeData = new TestHeightStructure("A"); + HeightStructure nodeData = new TestHeightStructure(); var gui = mocks.Stub(); gui.Stub(cmp => cmp.Get(nodeData, treeViewControl)).Return(menuBuilderMock); Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -r20e9bfea15dfe132ee137283a9f24bc4c413ce4a -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 20e9bfea15dfe132ee137283a9f24bc4c413ce4a) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../HeightStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -1043,7 +1043,7 @@ { var assessmentSection = mocks.Stub(); - HeightStructure structure1 = new TestHeightStructure("Structure 1", "Structure Id"); + HeightStructure structure1 = new TestHeightStructure("Structure Id", "Structure 1"); var existingCalculationGroup = new CalculationGroup(); var existingCalculation = new StructuresCalculation(); @@ -1117,8 +1117,8 @@ failureMechanism.HeightStructures.AddRange( new[] { - new TestHeightStructure("Structure 1", "1"), - new TestHeightStructure("Structure 2", "2") + new TestHeightStructure("1", "Structure 1"), + new TestHeightStructure("2", "Structure 2") }, "some path" ); @@ -1167,7 +1167,7 @@ var assessmentSection = mocks.Stub(); const string existingCalculationName = "Height structure"; - HeightStructure heightStructure = new TestHeightStructure(existingCalculationName, "heightStructureId"); + HeightStructure heightStructure = new TestHeightStructure("heightStructureId", existingCalculationName); var failureMechanism = new HeightStructuresFailureMechanism { Index: Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresContextTreeNodeInfoTest.cs =================================================================== diff -u -r8e74b5d6680386fce48486c8253b62331f7d7055 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresContextTreeNodeInfoTest.cs (.../HeightStructuresContextTreeNodeInfoTest.cs) (revision 8e74b5d6680386fce48486c8253b62331f7d7055) +++ Ringtoets/HeightStructures/test/Ringtoets.HeightStructures.Plugin.Test/TreeNodeInfos/HeightStructuresContextTreeNodeInfoTest.cs (.../HeightStructuresContextTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -132,7 +132,7 @@ var failureMechanism = new HeightStructuresFailureMechanism(); failureMechanism.HeightStructures.AddRange(new[] { - new TestHeightStructure("TestHeightStructure", "id") + new TestHeightStructure("id", "TestHeightStructure") }, "some path"); // Precondition @@ -160,8 +160,8 @@ var failureMechanism = new HeightStructuresFailureMechanism(); failureMechanism.HeightStructures.AddRange(new[] { - new TestHeightStructure("TestHeightStructure 1", "first id"), - new TestHeightStructure("TestHeightStructure 2", "second id") + new TestHeightStructure("first id", "TestHeightStructure 1"), + new TestHeightStructure("second id", "TestHeightStructure 2") }, "some path"); var heightStructuresContext = new HeightStructuresContext(failureMechanism.HeightStructures, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil.Test/TestStabilityPointStructureTest.cs =================================================================== diff -u -r6b18e2c0134c97e01ba13c518fb7a8efa7f42253 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil.Test/TestStabilityPointStructureTest.cs (.../TestStabilityPointStructureTest.cs) (revision 6b18e2c0134c97e01ba13c518fb7a8efa7f42253) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil.Test/TestStabilityPointStructureTest.cs (.../TestStabilityPointStructureTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -37,25 +37,25 @@ // Assert Assert.IsInstanceOf(structure); - Assert.AreEqual("aName", structure.Name); - Assert.AreEqual("anId", structure.Id); + Assert.AreEqual("id", structure.Id); + Assert.AreEqual("name", structure.Name); Assert.AreEqual(new Point2D(1.234, 2.3456), structure.Location); AssertStabilityPointStructuresDefault(structure); } [Test] - public void Constructor_WithName_ExpectedValues() + public void Constructor_WithId_ExpectedValues() { // Setup - const string name = "cool name!"; + const string id = "cool id"; // Call - var structure = new TestStabilityPointStructure(name); + var structure = new TestStabilityPointStructure(id); // Assert Assert.IsInstanceOf(structure); - Assert.AreEqual(name, structure.Name); - Assert.AreEqual("anId", structure.Id); + Assert.AreEqual(id, structure.Id); + Assert.AreEqual("name", structure.Name); Assert.AreEqual(new Point2D(1.234, 2.3456), structure.Location); AssertStabilityPointStructuresDefault(structure); } @@ -64,16 +64,16 @@ public void Constructor_WithNameAndId_ExpectedValues() { // Setup - const string name = "cool name!"; - const string id = "and a cool Id too!"; + const string id = "cool Id!"; + const string name = "cool name too!"; // Call var structure = new TestStabilityPointStructure(name, id); // Assert Assert.IsInstanceOf(structure); - Assert.AreEqual(name, structure.Name); Assert.AreEqual(id, structure.Id); + Assert.AreEqual(name, structure.Name); Assert.AreEqual(new Point2D(1.234, 2.3456), structure.Location); AssertStabilityPointStructuresDefault(structure); } @@ -89,8 +89,8 @@ // Assert Assert.IsInstanceOf(structure); - Assert.AreEqual("aName", structure.Name); - Assert.AreEqual("anId", structure.Id); + Assert.AreEqual("id", structure.Id); + Assert.AreEqual("name", structure.Name); Assert.AreEqual(point, structure.Location); AssertStabilityPointStructuresDefault(structure); } Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructure.cs =================================================================== diff -u -r6b18e2c0134c97e01ba13c518fb7a8efa7f42253 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructure.cs (.../TestStabilityPointStructure.cs) (revision 6b18e2c0134c97e01ba13c518fb7a8efa7f42253) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Data.TestUtil/TestStabilityPointStructure.cs (.../TestStabilityPointStructure.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -33,15 +33,15 @@ /// /// Creates a new instance of . /// - public TestStabilityPointStructure() : this("aName", "anId", new Point2D(1.234, 2.3456)) {} + public TestStabilityPointStructure() : this("name", "id", new Point2D(1.234, 2.3456)) {} /// /// Creates a new instance of . /// - /// The name of the structure. - /// Thrown when + /// The name of the structure. + /// Thrown when /// is null, empty or consists of only whitespaces. - public TestStabilityPointStructure(string name) : this(name, "anId", new Point2D(1.234, 2.3456)) {} + public TestStabilityPointStructure(string id) : this("name", id, new Point2D(1.234, 2.3456)) {} /// /// Creates a new instance of . @@ -58,7 +58,7 @@ /// The location of the structure. /// Thrown when /// is null. - public TestStabilityPointStructure(Point2D location) : this("aName", "anId", location) {} + public TestStabilityPointStructure(Point2D location) : this("name", "id", location) {} /// /// Creates a new instance of . Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationImporterTest.cs =================================================================== diff -u -r022a409926423d8107a307e28e3a13a8f2a83188 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationImporterTest.cs (.../StabilityPointStructuresCalculationConfigurationImporterTest.cs) (revision 022a409926423d8107a307e28e3a13a8f2a83188) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/Configurations/StabilityPointStructuresCalculationConfigurationImporterTest.cs (.../StabilityPointStructuresCalculationConfigurationImporterTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -627,7 +627,7 @@ string filePath = Path.Combine(importerPath, "validConfigurationStochastMeansOnly.xml"); var calculationGroup = new CalculationGroup(); - var structure = new TestStabilityPointStructure("kunstwerk1", "kunstwerk1"); + var structure = new TestStabilityPointStructure("kunstwerk1"); var importer = new StabilityPointStructuresCalculationConfigurationImporter( filePath, calculationGroup, @@ -753,7 +753,7 @@ string filePath = Path.Combine(importerPath, "validConfigurationStochastStandardDeviationVariationCoefficientOnly.xml"); var calculationGroup = new CalculationGroup(); - var structure = new TestStabilityPointStructure("kunstwerk1", "kunstwerk1"); + var structure = new TestStabilityPointStructure("kunstwerk1"); var importer = new StabilityPointStructuresCalculationConfigurationImporter( filePath, calculationGroup, @@ -905,7 +905,7 @@ { new Point2D(0, 3) }); - var structure = new TestStabilityPointStructure("kunstwerk1", "kunstwerk1"); + var structure = new TestStabilityPointStructure("kunstwerk1"); var importer = new StabilityPointStructuresCalculationConfigurationImporter( filePath, calculationGroup, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructureTreeNodeInfoTest.cs =================================================================== diff -u -rff948d4633181ead2677ab35467a93b4118c6751 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructureTreeNodeInfoTest.cs (.../StabilityPointStructureTreeNodeInfoTest.cs) (revision ff948d4633181ead2677ab35467a93b4118c6751) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructureTreeNodeInfoTest.cs (.../StabilityPointStructureTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -77,7 +77,7 @@ { // Setup const string name = "a nice name"; - StabilityPointStructure structure = new TestStabilityPointStructure(name); + StabilityPointStructure structure = new TestStabilityPointStructure(name, "id"); using (var plugin = new StabilityPointStructuresPlugin()) { Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rff948d4633181ead2677ab35467a93b4118c6751 -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision ff948d4633181ead2677ab35467a93b4118c6751) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) @@ -876,8 +876,8 @@ { var assessmentSection = mocks.Stub(); - StabilityPointStructure structure1 = new TestStabilityPointStructure("Structure 1"); - StabilityPointStructure structure2 = new TestStabilityPointStructure("Structure 2"); + StabilityPointStructure structure1 = new TestStabilityPointStructure(); + StabilityPointStructure structure2 = new TestStabilityPointStructure(); var existingCalculationGroup = new CalculationGroup(); var existingCalculation = new StructuresCalculation(); @@ -947,8 +947,8 @@ { var assessmentSection = mocks.Stub(); - StabilityPointStructure structure1 = new TestStabilityPointStructure("Structure 1"); - StabilityPointStructure structure2 = new TestStabilityPointStructure("Structure 2"); + StabilityPointStructure structure1 = new TestStabilityPointStructure(); + StabilityPointStructure structure2 = new TestStabilityPointStructure(); var failureMechanism = new StabilityPointStructuresFailureMechanism { @@ -1004,7 +1004,7 @@ var assessmentSection = mocks.Stub(); const string existingCalculationName = "StabilityPoint structure"; - StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(existingCalculationName); + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(existingCalculationName, "id"); var failureMechanism = new StabilityPointStructuresFailureMechanism {