Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/GrassCoverErosionInwards/DikeProfileCreateExtensions.cs =================================================================== diff -u -r01ff2c58c13df8f42661ae3e446dc2caaa94247e -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/GrassCoverErosionInwards/DikeProfileCreateExtensions.cs (.../DikeProfileCreateExtensions.cs) (revision 01ff2c58c13df8f42661ae3e446dc2caaa94247e) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/GrassCoverErosionInwards/DikeProfileCreateExtensions.cs (.../DikeProfileCreateExtensions.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -36,7 +36,7 @@ /// /// Creates a based on the information of the . /// - /// The result to create a database entity for. + /// The dike profile to create a database entity for. /// The object keeping track of create operations. /// A new . /// Thrown when is null. Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs =================================================================== diff -u -ra5714fc0488030773fff50dfc82041c6cb9edc2f -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision a5714fc0488030773fff50dfc82041c6cb9edc2f) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -228,7 +228,7 @@ #endregion - #region Strength Stability Lengthwise + #region Strength Stability Lengthwise Construction /// /// Read the and use the information to update a . Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BinaryConverters/Point2DBinaryConverterTest.cs =================================================================== diff -u -rba2f4f4e1c7a194fbe370fe3beee83326e454e5d -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BinaryConverters/Point2DBinaryConverterTest.cs (.../Point2DBinaryConverterTest.cs) (revision ba2f4f4e1c7a194fbe370fe3beee83326e454e5d) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BinaryConverters/Point2DBinaryConverterTest.cs (.../Point2DBinaryConverterTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -63,7 +63,7 @@ [Test] public void GivenArrayWithPoint2D_WhenConvertingRoundTrip_ThenEqualArrayOfPoints2D() { - // Setup + // Given var original = new[] { new Point2D(-7.7, -6.6), @@ -78,26 +78,26 @@ }; var converter = new Point2DBinaryConverter(); - // Call + // When byte[] bytes = converter.ToBytes(original); Point2D[] roundtripResult = converter.ToData(bytes); - // Assert + // Then CollectionAssert.AreEqual(original, roundtripResult); } [Test] public void GivenEmptyArray_WhenConvertingRoundTrip_ThenReturnEmptyArray() { - // Setup + // Given var original = new Point2D[0]; var converter = new Point2DBinaryConverter(); - // Call + // When byte[] bytes = converter.ToBytes(original); Point2D[] roundtripResult = converter.ToData(bytes); - // Assert + // Then CollectionAssert.IsEmpty(roundtripResult); } } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BinaryConverters/RoughnessPointBinaryConverterTest.cs =================================================================== diff -u -rba2f4f4e1c7a194fbe370fe3beee83326e454e5d -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BinaryConverters/RoughnessPointBinaryConverterTest.cs (.../RoughnessPointBinaryConverterTest.cs) (revision ba2f4f4e1c7a194fbe370fe3beee83326e454e5d) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/BinaryConverters/RoughnessPointBinaryConverterTest.cs (.../RoughnessPointBinaryConverterTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -66,7 +66,7 @@ [Test] public void GivenArrayWithPoint2D_WhenConvertingRoundTrip_ThenEqualArrayOfPoints2D() { - // Setup + // Given var original = new[] { new RoughnessPoint(new Point2D(-7.7, -6.6), 0.5), @@ -81,26 +81,26 @@ }; var converter = new RoughnessPointBinaryConverter(); - // Call + // When byte[] bytes = converter.ToBytes(original); RoughnessPoint[] roundtripResult = converter.ToData(bytes); - // Assert + // Then CollectionAssert.AreEqual(original, roundtripResult, new RoughnessPointComparer()); } [Test] public void GivenEmptyArray_WhenConvertingRoundTrip_ThenReturnEmptyArray() { - // Setup + // Given var original = new RoughnessPoint[0]; var converter = new RoughnessPointBinaryConverter(); - // Call + // When byte[] bytes = converter.ToBytes(original); RoughnessPoint[] roundtripResult = converter.ToData(bytes); - // Assert + // Then CollectionAssert.IsEmpty(roundtripResult); } Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs =================================================================== diff -u -r01ff2c58c13df8f42661ae3e446dc2caaa94247e -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs (.../DikeProfileCreateExtensionsTest.cs) (revision 01ff2c58c13df8f42661ae3e446dc2caaa94247e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/DikeProfileCreateExtensionsTest.cs (.../DikeProfileCreateExtensionsTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -20,7 +20,6 @@ // All rights reserved. using System; -using System.Collections; using Application.Ringtoets.Storage.BinaryConverters; using Application.Ringtoets.Storage.Create; @@ -96,10 +95,10 @@ Assert.AreEqual(dikeProfile.WorldReferencePoint.X, entity.X); Assert.AreEqual(dikeProfile.WorldReferencePoint.Y, entity.Y); Assert.AreEqual(dikeProfile.X0, entity.X0); - RoughnessPoint[] convertedDikeGeometry = new RoughnessPointBinaryConverter().ToData(entity.DikeGeometryData); - CollectionAssert.AreEqual(dikeProfile.DikeGeometry, convertedDikeGeometry, new RoughnessPointComparer()); - Point2D[] convertedForeshoreGeometry = new Point2DBinaryConverter().ToData(entity.ForeShoreData); - CollectionAssert.AreEqual(dikeProfile.ForeshoreGeometry, convertedForeshoreGeometry); + byte[] convertedDikeGeometry = new RoughnessPointBinaryConverter().ToBytes(dikeProfile.DikeGeometry); + CollectionAssert.AreEqual(convertedDikeGeometry, entity.DikeGeometryData); + byte[] convertedForeshoreGeometry = new Point2DBinaryConverter().ToBytes(dikeProfile.ForeshoreGeometry); + CollectionAssert.AreEqual(convertedForeshoreGeometry, entity.ForeShoreData); Assert.AreEqual(dikeProfile.Orientation.Value, entity.Orientation); Assert.AreEqual(dikeProfile.DikeHeight.Value, entity.DikeHeight); Assert.AreEqual(dikeProfile.Name, entity.Name); @@ -143,10 +142,10 @@ Assert.AreEqual(dikeProfile.WorldReferencePoint.X, entity.X); Assert.AreEqual(dikeProfile.WorldReferencePoint.Y, entity.Y); Assert.AreEqual(dikeProfile.X0, entity.X0); - RoughnessPoint[] convertedDikeGeometry = new RoughnessPointBinaryConverter().ToData(entity.DikeGeometryData); - CollectionAssert.AreEqual(dikeProfile.DikeGeometry, convertedDikeGeometry, new RoughnessPointComparer()); - Point2D[] convertedForeshoreGeometry = new Point2DBinaryConverter().ToData(entity.ForeShoreData); - CollectionAssert.AreEqual(dikeProfile.ForeshoreGeometry, convertedForeshoreGeometry); + byte[] convertedDikeGeometry = new RoughnessPointBinaryConverter().ToBytes(dikeProfile.DikeGeometry); + CollectionAssert.AreEqual(convertedDikeGeometry, entity.DikeGeometryData); + byte[] convertedForeshoreGeometry = new Point2DBinaryConverter().ToBytes(dikeProfile.ForeshoreGeometry); + CollectionAssert.AreEqual(convertedForeshoreGeometry, entity.ForeShoreData); Assert.AreEqual(dikeProfile.Orientation.Value, entity.Orientation); Assert.AreEqual(dikeProfile.DikeHeight.Value, entity.DikeHeight); Assert.AreEqual(dikeProfile.Name, entity.Name); @@ -180,19 +179,5 @@ registry.TransferIds(); Assert.AreEqual(entity.DikeProfileEntityId, dikeProfile.StorageId); } - - private class RoughnessPointComparer : IComparer - { - public int Compare(object x, object y) - { - RoughnessPoint x1 = (RoughnessPoint)x; - RoughnessPoint y1 = (RoughnessPoint)y; - if (x1.Point.Equals(y1.Point) && x1.Roughness.Equals(y1.Roughness)) - { - return 0; - } - return 1; - } - } } } \ No newline at end of file Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -r01ff2c58c13df8f42661ae3e446dc2caaa94247e -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision 01ff2c58c13df8f42661ae3e446dc2caaa94247e) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/GrassCoverErosionInwards/GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs (.../GrassCoverErosionInwardsFailureMechanismCreateExtensionsTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -75,7 +75,7 @@ // Assert Assert.IsNotNull(entity); - Assert.AreEqual((short) FailureMechanismType.GrassRevetmentTopErosionAndInwards, entity.FailureMechanismType); + Assert.AreEqual((short)FailureMechanismType.GrassRevetmentTopErosionAndInwards, entity.FailureMechanismType); Assert.AreEqual(Convert.ToByte(isRelevant), entity.IsRelevant); Assert.AreEqual(failureMechanism.Comments, entity.Comments); @@ -149,7 +149,7 @@ new RoughnessPoint(new Point2D(6, 6), 1), new RoughnessPoint(new Point2D(7, 7), 1), }, - new Point2D[0], + new Point2D[0], new BreakWater(BreakWaterType.Caisson, 8), new DikeProfile.ConstructionProperties { Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs =================================================================== diff -u -r5da102ed42420b0272dfd2ecdd5aaa3a9ebd251c -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision 5da102ed42420b0272dfd2ecdd5aaa3a9ebd251c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/PersistenceRegistryTest.cs (.../PersistenceRegistryTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -956,10 +956,9 @@ { // Setup var registry = new PersistenceRegistry(); - DikeProfile profile = CreateDikeProfile(); // Call - TestDelegate test = () => registry.Register(null, profile); + TestDelegate test = () => registry.Register(null, CreateDikeProfile()); // Assert var paramName = Assert.Throws(test).ParamName; Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -r3ce8a0c103af363c8e00798d95588ebe4d1e04a5 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 3ce8a0c103af363c8e00798d95588ebe4d1e04a5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -135,7 +135,7 @@ [STAThread] public void GivenRingtoetsGuiWithStorageSql_WhenRunWithValidFile_ProjectSet() { - // Setup + // Given var projectStore = new StorageSqLite(); Project fullProject = RingtoetsProjectHelper.GetFullTestProject(); var expectedProjectName = Path.GetFileNameWithoutExtension(tempRingtoetsFile); @@ -146,10 +146,10 @@ using (var gui = new GuiCore(new MainWindow(), projectStore, new GuiCoreSettings())) { - // Call + // When Action action = () => gui.Run(tempRingtoetsFile); - // Assert + // Then var expectedMessages = new[] { "Openen van bestaand Ringtoetsproject.", @@ -169,16 +169,16 @@ [STAThread] public void GivenRingtoetsGuiWithStorageSql_WhenRunWithInvalidFile_EmptyProjectSet() { - // Setup + // Given var testFile = "SomeFile"; var projectStore = new StorageSqLite(); using (var gui = new GuiCore(new MainWindow(), projectStore, new GuiCoreSettings())) { - // Call + // When Action action = () => gui.Run(testFile); - // Assert + // Then var expectedMessages = new[] { "Openen van bestaand Ringtoetsproject.", @@ -202,15 +202,15 @@ [TestCase(" ")] public void GivenRingtoetsGuiWithStorageSql_WhenRunWithEmptyFile_EmptyProjectSet(string testFile) { - // Setup + // Given var projectStore = new StorageSqLite(); using (var gui = new GuiCore(new MainWindow(), projectStore, new GuiCoreSettings())) { - // Call + // When Action action = () => gui.Run(testFile); - // Assert + // Then var expectedMessages = new[] { "Nieuw project aanmaken..." Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/GrassCoverErosionInwards/DikeProfileUpdateExtensionsTest.cs =================================================================== diff -u -ra5714fc0488030773fff50dfc82041c6cb9edc2f -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/GrassCoverErosionInwards/DikeProfileUpdateExtensionsTest.cs (.../DikeProfileUpdateExtensionsTest.cs) (revision a5714fc0488030773fff50dfc82041c6cb9edc2f) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Update/GrassCoverErosionInwards/DikeProfileUpdateExtensionsTest.cs (.../DikeProfileUpdateExtensionsTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -79,14 +79,14 @@ { // Setup var mocks = new MockRepository(); - IRingtoetsEntities ringtoetsEntitites = RingtoetsEntitiesHelper.CreateStub(mocks); + IRingtoetsEntities ringtoetsEntities = RingtoetsEntitiesHelper.CreateStub(mocks); mocks.ReplayAll(); var registry = new PersistenceRegistry(); DikeProfile profile = CreateSimpleDikeProfile(); // Call - TestDelegate call = () => profile.Update(registry, ringtoetsEntitites); + TestDelegate call = () => profile.Update(registry, ringtoetsEntities); // Assert string expectedMessage = string.Format("Het object 'DikeProfileEntity' met id '{0}' is niet gevonden.", @@ -101,19 +101,19 @@ { // Setup var mocks = new MockRepository(); - IRingtoetsEntities ringtoetsEntitites = RingtoetsEntitiesHelper.CreateStub(mocks); + IRingtoetsEntities ringtoetsEntities = RingtoetsEntitiesHelper.CreateStub(mocks); mocks.ReplayAll(); var registry = new PersistenceRegistry(); DikeProfile profile = CreateSimpleDikeProfile(); - ringtoetsEntitites.DikeProfileEntities.Add(new DikeProfileEntity + ringtoetsEntities.DikeProfileEntities.Add(new DikeProfileEntity { DikeProfileEntityId = 1 }); // Call - TestDelegate call = () => profile.Update(registry, ringtoetsEntitites); + TestDelegate call = () => profile.Update(registry, ringtoetsEntities); // Assert string expectedMessage = string.Format("Het object 'DikeProfileEntity' met id '{0}' is niet gevonden.", Index: Core/Common/test/Core.Common.Controls.Test/PresentationObjects/ObservableWrappedObjectContextBaseTest.cs =================================================================== diff -u -re775448bfb8290e43d62340a53a08723bbc035c6 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Core/Common/test/Core.Common.Controls.Test/PresentationObjects/ObservableWrappedObjectContextBaseTest.cs (.../ObservableWrappedObjectContextBaseTest.cs) (revision e775448bfb8290e43d62340a53a08723bbc035c6) +++ Core/Common/test/Core.Common.Controls.Test/PresentationObjects/ObservableWrappedObjectContextBaseTest.cs (.../ObservableWrappedObjectContextBaseTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -117,7 +117,7 @@ [Test] public void GivenContextWithAttachedObserver_WhenWrappedDataNotifiesObservers_ThenObserverIsNotified() { - // Setup + // Given var mocks = new MockRepository(); var observerMock = mocks.StrictMock(); observerMock.Expect(o => o.UpdateObserver()); @@ -129,10 +129,10 @@ context.Attach(observerMock); - // Call + // When sourceObject.NotifyObservers(); - // Assert + // Then mocks.VerifyAll(); // Expect call UpdateObserver on 'observer' } Index: Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs =================================================================== diff -u -r223b2a4edc4ac816051c7eeecb735c34a6246574 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs (.../TreeViewControlTest.cs) (revision 223b2a4edc4ac816051c7eeecb735c34a6246574) +++ Core/Common/test/Core.Common.Controls.TreeView.Test/TreeViewControlTest.cs (.../TreeViewControlTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -1369,7 +1369,7 @@ public void GivenTreeViewControl_WhenMouseClickOnNode_SelectThatNodeForRightMouseButtons( MouseButtons mouseButtonDown, bool changeSelectionToTarget) { - // Setup + // Given using (var treeViewControl = new TreeViewControl()) { var selectionTarget = "I'm the target!"; @@ -1404,10 +1404,10 @@ WindowsFormsTestHelper.Show(treeViewControl); var treeViewTester = new TreeViewTester(identifier); - // Call + // When treeViewTester.FireEvent("MouseClick", new MouseEventArgs(mouseButtonDown, 1, 60, 30, 0)); - // Assert + // Then object expectedSelectedData = changeSelectionToTarget ? selectionTarget : data; Assert.AreEqual(expectedSelectedData, treeViewControl.SelectedData); } @@ -1426,7 +1426,7 @@ public void GivenTreeViewControl_WhenTreeViewItemDragOnNode_SelectThatNode( bool canRenameNode) { - // Setup + // Given using (var treeViewControl = new TreeViewControl()) { var selectionTarget = "I'm the target!"; @@ -1463,10 +1463,10 @@ WindowsFormsTestHelper.Show(treeViewControl); var treeViewTester = new TreeViewTester(identifier); - // Call + // When treeViewTester.FireEvent("ItemDrag", new ItemDragEventArgs(MouseButtons.Left, childNode)); - // Assert + // Then object expectedSelectedData = selectionTarget; Assert.AreEqual(expectedSelectedData, treeViewControl.SelectedData); } Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs =================================================================== diff -u -r151bab16a7ebc1bffc0621ab56c6dc219db1e90f -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision 151bab16a7ebc1bffc0621ab56c6dc219db1e90f) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -51,7 +51,7 @@ } [Test] - public void GivenTestProperties_WhenConstructing_ThenCorrectNumberOfPropertiesCreated() + public void Constructor_ClassWith4Properties_CorrectNumberOfPropertiesCreated() { // Setup var propertyObject = new TestProperties(); @@ -64,7 +64,7 @@ } [Test] - public void GivenTestProperties_WhenConstructing_ThenPropertySpecsHaveAttributesSet() + public void Constructor_ClassWithAttributes_PropertySpecsHaveAttributesSet() { // Setup var propertyObject = new TestProperties(); @@ -238,7 +238,7 @@ [Test] public void GivenObjectPropertiesWithDynamicVisibleProperties_WhenPropertyShown_ThenPropertyShouldBePresentInBag() { - // Setup + // Given var propertyObject = new TestProperties { Visible = true @@ -250,11 +250,11 @@ new BrowsableAttribute(true) }); - // Call + // When var dynamicallyVisiblePropertyName = TypeUtils.GetMemberName(tp => tp.Name); var namePropertyDescriptor = propertyDescriptorCollection.Find(dynamicallyVisiblePropertyName, false); - // Assert + // Then Assert.IsTrue(namePropertyDescriptor.IsBrowsable, string.Format("{0} should be visible", dynamicallyVisiblePropertyName)); } @@ -333,7 +333,7 @@ [Test] public void GivenPropertyDescriptorFromDynamicPropertyBag_WhenSettingProperty_ThenWrappedObjectUpdated() { - // Setup + // Given var testProperties = new TestProperties { Name = "name" @@ -342,15 +342,15 @@ var newName = "newName"; - // Call + // When dynamicPropertyBag.GetProperties()["Name"].SetValue(testProperties, newName); - // Assert + // Then Assert.AreEqual(newName, testProperties.Name); } [Test] - public void GivenPropertiesWithoutPublicSetter_WhenGettingPropertyDescriptors_ThenPropertiesDecoratedWithReadOnlyAttribute() + public void GetProperties_ClassWithPropertiesWithoutPublicSetter_PropertiesDecoratedWithReadOnlyAttribute() { // Setup var dynamicPropertyBag = new DynamicPropertyBag(new TestWithoutSetterPropertyClassProperties()); Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/DikeProfile.cs =================================================================== diff -u -r53aef346fd0ee3cc79d1f5df9171c476453f2935 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/DikeProfile.cs (.../DikeProfile.cs) (revision 53aef346fd0ee3cc79d1f5df9171c476453f2935) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/DikeProfile.cs (.../DikeProfile.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -44,8 +44,9 @@ /// The geometry of the dike foreshore. /// The break water definition (can be null). /// The property values required to create an instance of . - /// Thrown when - /// or is null. + /// Thrown when either , + /// , or + /// is null. /// Thrown when any element of /// or is null. public DikeProfile(Point2D worldCoordinate, RoughnessPoint[] dikeGeometry, Point2D[] foreshoreGeometry, @@ -55,6 +56,10 @@ { throw new ArgumentNullException("worldCoordinate"); } + if (properties == null) + { + throw new ArgumentNullException("properties"); + } SetGeometry(dikeGeometry); SetForeshoreGeometry(foreshoreGeometry); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/DikeProfileTest.cs =================================================================== diff -u -r53aef346fd0ee3cc79d1f5df9171c476453f2935 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/DikeProfileTest.cs (.../DikeProfileTest.cs) (revision 53aef346fd0ee3cc79d1f5df9171c476453f2935) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/DikeProfileTest.cs (.../DikeProfileTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -140,6 +140,17 @@ } [Test] + public void Constructor_ConstructionPropertiesIsNull_ThrowsArgumentNullException() + { + // Call + TestDelegate call = () => new DikeProfile(new Point2D(0,0), new RoughnessPoint[0], new Point2D[0], null, null); + + // Assert + string paramName = Assert.Throws(call).ParamName; + Assert.AreEqual("properties", paramName); + } + + [Test] public void Orientation_SetToValueWithTooManyDecimalPlaces_ValueIsRounded() { // Call Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfilePropertiesTest.cs =================================================================== diff -u -r53aef346fd0ee3cc79d1f5df9171c476453f2935 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfilePropertiesTest.cs (.../DikeProfilePropertiesTest.cs) (revision 53aef346fd0ee3cc79d1f5df9171c476453f2935) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeProfilePropertiesTest.cs (.../DikeProfilePropertiesTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -46,10 +46,11 @@ public void Data_SetNewDikeProfileInstance_ReturnCorrectPropertyValues() { // Setup + const string name = "Dijkprofiel"; var dikeProfile = new DikeProfile(new Point2D(0, 0), new RoughnessPoint[0], new Point2D[0], null, new DikeProfile.ConstructionProperties { - Name = "Dijkprofiel" + Name = name }); // Call @@ -59,7 +60,7 @@ }; // Assert - Assert.AreEqual("Dijkprofiel", properties.Name); + Assert.AreEqual(name, properties.Name); Assert.AreEqual(2, properties.Orientation.NumberOfDecimalPlaces); Assert.AreEqual(0.0, properties.Orientation.Value); Assert.AreSame(dikeProfile, properties.BreakWater.Data); Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs =================================================================== diff -u -ra761c195a25ca9f764909e8064e933b9b5c57e01 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismResultViewTest.cs) (revision a761c195a25ca9f764909e8064e933b9b5c57e01) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/Views/GrassCoverErosionInwardsFailureMechanismResultViewTest.cs (.../GrassCoverErosionInwardsFailureMechanismResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -294,7 +294,7 @@ [Test] public void GivenSectionResultWithoutCalculation_ThenLayerTwoANoError() { - // Setup + // Given using (var view = ShowFullyConfiguredFailureMechanismResultsView()) { FailureMechanismSection section = CreateSimpleFailureMechanismSection(); @@ -309,10 +309,10 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerTwoAIndex]; - // Call + // When var formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. - // Assert + // Then Assert.AreEqual("-", formattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); } @@ -321,7 +321,7 @@ [Test] public void GivenSectionResultAndCalculationNotCalculated_ThenLayerTwoAErrorTooltip() { - // Setup + // Given using (var view = ShowFullyConfiguredFailureMechanismResultsView()) { var calculation = new GrassCoverErosionInwardsCalculation(); @@ -341,10 +341,10 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerTwoAIndex]; - // Call + // When var formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. - // Assert + // Then Assert.AreEqual("-", formattedValue); Assert.AreEqual("De maatgevende berekening voor dit vak is niet uitgevoerd.", dataGridViewCell.ErrorText); } @@ -353,7 +353,7 @@ [Test] public void GivenSectionResultAndFailedCalculation_ThenLayerTwoAErrorTooltip() { - // Setup + // Given using (var view = ShowFullyConfiguredFailureMechanismResultsView()) { var probabilityAssessmentOutput = new ProbabilityAssessmentOutput(1.0, 1.0, double.NaN, 1.0, 1.0); @@ -377,10 +377,10 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerTwoAIndex]; - // Call + // When var formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. - // Assert + // Then Assert.AreEqual("-", formattedValue); Assert.AreEqual("De maatgevende berekening voor dit vak heeft geen geldige uitkomst.", dataGridViewCell.ErrorText); } @@ -389,7 +389,7 @@ [Test] public void GivenSectionResultAndSuccessfulCalculation_ThenLayerTwoANoError() { - // Setup + // Given using (var view = ShowFullyConfiguredFailureMechanismResultsView()) { const double probability = 0.56789; @@ -414,10 +414,10 @@ DataGridViewCell dataGridViewCell = dataGridView.Rows[0].Cells[assessmentLayerTwoAIndex]; - // Call + // When var formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. - // Assert + // Then Assert.AreEqual(ProbabilityFormattingHelper.Format(probability), formattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); } @@ -426,7 +426,7 @@ [Test] public void GivenSectionResultAndSuccessfulCalculation_WhenChangingCalculationToFailed_ThenLayerTwoAHasError() { - // Setup + // Given using (var view = ShowFullyConfiguredFailureMechanismResultsView()) { const double probability = 0.56789; @@ -462,11 +462,11 @@ Assert.AreEqual(ProbabilityFormattingHelper.Format(probability), formattedValue); Assert.IsEmpty(dataGridViewCell.ErrorText); - // Call + // When sectionResult.Calculation = failedCalculation; formattedValue = dataGridViewCell.FormattedValue; // Need to do this to fire the CellFormatting event. - // Assert + // Then Assert.AreEqual("-", formattedValue); Assert.AreEqual("De maatgevende berekening voor dit vak heeft geen geldige uitkomst.", dataGridViewCell.ErrorText); } Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/DuneErosionResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/DuneErosionResultViewTest.cs (.../DuneErosionResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/DuneErosionResultViewTest.cs (.../DuneErosionResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -37,19 +37,19 @@ public class DuneErosionResultViewTest { [Test] - public void GivenFormWithDuneErosionFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithDuneErosionFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new DuneErosionResultView()) { form.Controls.Add(view); - // Call + // When form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(3, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverErosionOutwardsResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverErosionOutwardsResultViewTest.cs (.../GrassCoverErosionOutwardsResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverErosionOutwardsResultViewTest.cs (.../GrassCoverErosionOutwardsResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -38,19 +38,19 @@ public class GrassCoverErosionOutwardsResultViewTest { [Test] - public void GivenFormWithGrassCoverErosionOutwardsFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithGrassCoverErosionOutwardsFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new GrassCoverErosionOutwardsResultView()) { form.Controls.Add(view); - // Call + // Call form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(4, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffInwardsResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffInwardsResultViewTest.cs (.../GrassCoverSlipOffInwardsResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffInwardsResultViewTest.cs (.../GrassCoverSlipOffInwardsResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -38,19 +38,19 @@ public class GrassCoverSlipOffInwardsResultViewTest { [Test] - public void GivenFormWithGrassCoverSlipOffInwardsFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithGrassCoverSlipOffInwardsFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new GrassCoverSlipOffInwardsResultView()) { form.Controls.Add(view); - // Call - + + // When form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(4, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultViewTest.cs (.../GrassCoverSlipOffOutwardsResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/GrassCoverSlipOffOutwardsResultViewTest.cs (.../GrassCoverSlipOffOutwardsResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -38,19 +38,19 @@ public class GrassCoverSlipOffOutwardsResultViewTest { [Test] - public void GivenFormWithGrassCoverSlipOffOutwardsFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithGrassCoverSlipOffOutwardsFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new GrassCoverSlipOffOutwardsResultView()) { form.Controls.Add(view); - // Call - + + // When form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(4, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MicrostabilityResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MicrostabilityResultViewTest.cs (.../MicrostabilityResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/MicrostabilityResultViewTest.cs (.../MicrostabilityResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -38,19 +38,19 @@ public class MicrostabilityResultViewTest { [Test] - public void GivenFormWithMicrostabilityFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithMicrostabilityFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new MicrostabilityResultView()) { form.Controls.Add(view); + // Call - form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(4, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/PipingStructureResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/PipingStructureResultViewTest.cs (.../PipingStructureResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/PipingStructureResultViewTest.cs (.../PipingStructureResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -38,19 +38,19 @@ public class PipingStructureResultViewTest { [Test] - public void GivenFormWithPipingStructureFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithPipingStructureFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new PipingStructureResultView()) { form.Controls.Add(view); - // Call - + + // When form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(4, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/StabilityStoneCoverResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/StabilityStoneCoverResultViewTest.cs (.../StabilityStoneCoverResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/StabilityStoneCoverResultViewTest.cs (.../StabilityStoneCoverResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -37,19 +37,19 @@ public class StabilityStoneCoverResultViewTest { [Test] - public void GivenFormWithStabilityStoneCoverFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithStabilityStoneCoverFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new StabilityStoneCoverResultView()) { form.Controls.Add(view); - // Call - + + // When form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(3, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/TechnicalInnovationResultViewTest.cs =================================================================== diff -u -rbe9428984d28fcbd8f6089f1c1184cd9763c18bf -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/TechnicalInnovationResultViewTest.cs (.../TechnicalInnovationResultViewTest.cs) (revision be9428984d28fcbd8f6089f1c1184cd9763c18bf) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Views/SectionResultViews/TechnicalInnovationResultViewTest.cs (.../TechnicalInnovationResultViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -38,19 +38,19 @@ public class TechnicalInnovationResultViewTest { [Test] - public void GivenFormWithTechnicalInnovationFailureMechanismResultView_WhenAlways_ThenExpectedColumnsAreVisible() + public void GivenFormWithTechnicalInnovationFailureMechanismResultView_WhenShown_ThenExpectedColumnsAreVisible() { - // Setup + // Given using (var form = new Form()) { using (var view = new TechnicalInnovationResultView()) { form.Controls.Add(view); - // Call - + + // When form.Show(); - // Assert + // Then var dataGridView = (DataGridView) new ControlTester("dataGridView").TheObject; Assert.AreEqual(3, dataGridView.ColumnCount); Index: Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs =================================================================== diff -u -r1e5d9b5cfc66cb8187d534d891afef1c9080378b -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision 1e5d9b5cfc66cb8187d534d891afef1c9080378b) +++ Ringtoets/Integration/test/Ringtoets.Integration.Plugin.Test/RingtoetsPluginTest.cs (.../RingtoetsPluginTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -78,7 +78,7 @@ [STAThread] // For creation of XAML UI component public void GivenPluginWithGuiSet_WhenProjectOnGuiChangesToProjectWithoutHydraulicBoundaryDatabase_ThenNoWarning() { - // Setup + // Given var mocks = new MockRepository(); var projectStore = mocks.Stub(); mocks.ReplayAll(); @@ -90,10 +90,10 @@ plugin.Gui = gui; gui.Run(); - // Call + // When Action action = () => gui.Project = new Project(); - // Assert + // Then TestHelper.AssertLogMessagesCount(action, 0); } } @@ -105,7 +105,7 @@ [STAThread] // For creation of XAML UI component public void GivenPluginWithGuiSet_WhenProjectOnGuiChangesToProjectWithHydraulicBoundaryDatabaseWithExistingLocation_ThenNoWarning() { - // Setup + // Given var mocks = new MockRepository(); var projectStore = mocks.Stub(); mocks.ReplayAll(); @@ -130,10 +130,10 @@ }; project.Items.Add(section); - // Call + // When Action action = () => { gui.Project = project; }; - // Assert + // Then TestHelper.AssertLogMessagesCount(action, 0); } } @@ -145,7 +145,7 @@ [STAThread] // For creation of XAML UI component public void GivenPluginWithGuiSet_WhenProjectOnGuiChangesToProjectWithHydraulicBoundaryDatabaseWithNonExistingLocation_ThenWarning() { - // Setup + // Given var mocks = new MockRepository(); var projectStore = mocks.Stub(); mocks.ReplayAll(); @@ -169,10 +169,10 @@ plugin.Gui = gui; gui.Run(); - // Call + // When Action action = () => { gui.Project = project; }; - // Assert + // Then var fileMissingMessage = string.Format("Fout bij het lezen van bestand '{0}': Het bestand bestaat niet.", notExistingFile); string message = string.Format( RingtoetsCommonFormsResources.Hydraulic_boundary_database_connection_failed_0_, Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs =================================================================== diff -u -r775077965de8db55e76ff3ef1f050d7007a8b4e7 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs (.../PipingCalculationsViewTest.cs) (revision 775077965de8db55e76ff3ef1f050d7007a8b4e7) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingCalculationsViewTest.cs (.../PipingCalculationsViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -525,7 +525,7 @@ [Test] public void GivenPipingScenariosViewWithPipingFailureMechanism_WhenSectionsAddedAndPipingFailureMechanismNotified_ThenSectionsListBoxCorrectlyUpdated() { - // Setup + // Given var pipingFailureMechanismWithSections = new PipingFailureMechanism(); var failureMechanismSection1 = new FailureMechanismSection("Section 1", new List { @@ -555,10 +555,10 @@ pipingFailureMechanismWithSections.AddSection(failureMechanismSection2); pipingFailureMechanismWithSections.AddSection(failureMechanismSection3); - // Call + // When pipingFailureMechanismWithSections.NotifyObservers(); - // Assert + // Then Assert.AreEqual(3, listBox.Items.Count); Assert.AreSame(failureMechanismSection1, listBox.Items[0]); Assert.AreSame(failureMechanismSection2, listBox.Items[1]); Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingScenariosViewTest.cs =================================================================== diff -u -rabe84fefd617640366647f458d22631d2e690ddb -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingScenariosViewTest.cs (.../PipingScenariosViewTest.cs) (revision abe84fefd617640366647f458d22631d2e690ddb) +++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/Views/PipingScenariosViewTest.cs (.../PipingScenariosViewTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -161,7 +161,7 @@ [Test] public void GivenPipingScenariosViewWithPipingFailureMechanism_WhenSectionsAddedAndPipingFailureMechanismNotified_ThenSectionsListBoxCorrectlyUpdated() { - // Setup + // Given var pipingFailureMechanismWithSections = new PipingFailureMechanism(); var failureMechanismSection1 = new FailureMechanismSection("Section 1", new List { @@ -191,10 +191,10 @@ pipingFailureMechanismWithSections.AddSection(failureMechanismSection2); pipingFailureMechanismWithSections.AddSection(failureMechanismSection3); - // Call + // When pipingFailureMechanismWithSections.NotifyObservers(); - // Assert + // Then Assert.AreEqual(3, listBox.Items.Count); Assert.AreSame(failureMechanismSection1, listBox.Items[0]); Assert.AreSame(failureMechanismSection2, listBox.Items[1]); Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/PipingSoilProfileReaderTest.cs =================================================================== diff -u -r1b269dccd0ad017fd308a5c9e6639d9a6867b018 -rb954fb6f2dd56ffb96be7b61ab129f19d879d2ab --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/PipingSoilProfileReaderTest.cs (.../PipingSoilProfileReaderTest.cs) (revision 1b269dccd0ad017fd308a5c9e6639d9a6867b018) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/PipingSoilProfileReaderTest.cs (.../PipingSoilProfileReaderTest.cs) (revision b954fb6f2dd56ffb96be7b61ab129f19d879d2ab) @@ -632,11 +632,11 @@ private void GivenDatabaseWith1DProfile_WhenReadingTheCompleteDatabase_ReturnsCompleteSoilProfile() { - // Setup + // Given var testFile = "1dprofile.soil"; using (var pipingSoilProfilesReader = new PipingSoilProfileReader(Path.Combine(testDataPath, testFile))) { - // Call + // When var result = new Collection(); var skipped = 0; @@ -652,7 +652,7 @@ } } - // Assert + // Then Assert.AreEqual(0, skipped); Assert.AreEqual(1, pipingSoilProfilesReader.Count); Assert.AreEqual(1, result.Count); @@ -668,11 +668,11 @@ private void GivenACompleteDatabase_WhenReadingTheCompleteDatabase_ReturnsProfilesWithLayersAndGeometries() { - // Setup + // Given var testFile = "complete.soil"; using (var pipingSoilProfilesReader = new PipingSoilProfileReader(Path.Combine(testDataPath, testFile))) { - // Call + // When ICollection result = new List(); int skipped = 0; @@ -688,7 +688,7 @@ } } - // Assert + // Then Assert.AreEqual(0, skipped); Assert.AreEqual(26, pipingSoilProfilesReader.Count); Assert.AreEqual(26, result.Count);