Fisheye: Tag 42b5598732d84341529bc3188cf120606eeac52a refers to a dead (removed) revision in file `Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverCalculationsProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverHydraulicLoadsProperties.cs
===================================================================
diff -u
--- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverHydraulicLoadsProperties.cs (revision 0)
+++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PropertyClasses/WaveImpactAsphaltCoverHydraulicLoadsProperties.cs (revision 42b5598732d84341529bc3188cf120606eeac52a)
@@ -0,0 +1,96 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System;
+using Core.Common.Base.Data;
+using Core.Common.Util.Attributes;
+using Core.Gui.Attributes;
+using Riskeer.WaveImpactAsphaltCover.Data;
+using RiskeerCommonFormsResources = Riskeer.Common.Forms.Properties.Resources;
+using RiskeerRevetmentFormsResources = Riskeer.Revetment.Forms.Properties.Resources;
+
+namespace Riskeer.WaveImpactAsphaltCover.Forms.PropertyClasses
+{
+ ///
+ /// Calculation related ViewModel of for properties panel.
+ ///
+ public class WaveImpactAsphaltCoverHydraulicLoadsProperties : WaveImpactAsphaltCoverFailureMechanismProperties
+ {
+ private const int namePropertyIndex = 1;
+ private const int codePropertyIndex = 2;
+ private const int groupPropertyIndex = 3;
+ private const int aPropertyIndex = 4;
+ private const int bPropertyIndex = 5;
+ private const int cPropertyIndex = 6;
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The instance to show the properties of.
+ /// Thrown when is null.
+ public WaveImpactAsphaltCoverHydraulicLoadsProperties(WaveImpactAsphaltCoverFailureMechanism data) : base(data, new ConstructionProperties
+ {
+ NamePropertyIndex = namePropertyIndex,
+ CodePropertyIndex = codePropertyIndex,
+ GroupPropertyIndex = groupPropertyIndex
+ }) {}
+
+ #region Model settings
+
+ [PropertyOrder(aPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelSettings))]
+ [ResourcesDisplayName(typeof(RiskeerRevetmentFormsResources), nameof(RiskeerRevetmentFormsResources.GeneralWaveConditionsInput_A_DisplayName))]
+ [ResourcesDescription(typeof(RiskeerRevetmentFormsResources), nameof(RiskeerRevetmentFormsResources.GeneralWaveConditionsInput_A_Description))]
+ public RoundedDouble A
+ {
+ get
+ {
+ return data.GeneralInput.A;
+ }
+ }
+
+ [PropertyOrder(bPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelSettings))]
+ [ResourcesDisplayName(typeof(RiskeerRevetmentFormsResources), nameof(RiskeerRevetmentFormsResources.GeneralWaveConditionsInput_B_DisplayName))]
+ [ResourcesDescription(typeof(RiskeerRevetmentFormsResources), nameof(RiskeerRevetmentFormsResources.GeneralWaveConditionsInput_B_Description))]
+ public RoundedDouble B
+ {
+ get
+ {
+ return data.GeneralInput.B;
+ }
+ }
+
+ [PropertyOrder(cPropertyIndex)]
+ [ResourcesCategory(typeof(RiskeerCommonFormsResources), nameof(RiskeerCommonFormsResources.Categories_ModelSettings))]
+ [ResourcesDisplayName(typeof(RiskeerRevetmentFormsResources), nameof(RiskeerRevetmentFormsResources.GeneralWaveConditionsInput_C_DisplayName))]
+ [ResourcesDescription(typeof(RiskeerRevetmentFormsResources), nameof(RiskeerRevetmentFormsResources.GeneralWaveConditionsInput_C_Description))]
+ public RoundedDouble C
+ {
+ get
+ {
+ return data.GeneralInput.C;
+ }
+ }
+
+ #endregion
+ }
+}
\ No newline at end of file
Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs
===================================================================
diff -u -r1dd2c22368f99235c15314f434505d4b5fc27a90 -r42b5598732d84341529bc3188cf120606eeac52a
--- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 1dd2c22368f99235c15314f434505d4b5fc27a90)
+++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 42b5598732d84341529bc3188cf120606eeac52a)
@@ -68,9 +68,9 @@
{
public override IEnumerable GetPropertyInfos()
{
- yield return new PropertyInfo
+ yield return new PropertyInfo
{
- CreateInstance = context => new WaveImpactAsphaltCoverCalculationsProperties(context.WrappedData)
+ CreateInstance = context => new WaveImpactAsphaltCoverHydraulicLoadsProperties(context.WrappedData)
};
yield return new PropertyInfo
{
Fisheye: Tag 42b5598732d84341529bc3188cf120606eeac52a refers to a dead (removed) revision in file `Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverCalculationsPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverHydraulicLoadsPropertiesTest.cs
===================================================================
diff -u
--- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverHydraulicLoadsPropertiesTest.cs (revision 0)
+++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PropertyClasses/WaveImpactAsphaltCoverHydraulicLoadsPropertiesTest.cs (revision 42b5598732d84341529bc3188cf120606eeac52a)
@@ -0,0 +1,119 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.ComponentModel;
+using Core.Gui.TestUtil;
+using NUnit.Framework;
+using Riskeer.Revetment.Data;
+using Riskeer.WaveImpactAsphaltCover.Data;
+using Riskeer.WaveImpactAsphaltCover.Forms.PropertyClasses;
+
+namespace Riskeer.WaveImpactAsphaltCover.Forms.Test.PropertyClasses
+{
+ [TestFixture]
+ public class WaveImpactAsphaltCoverHydraulicLoadsPropertiesTest
+ {
+ private const int namePropertyIndex = 0;
+ private const int codePropertyIndex = 1;
+ private const int groupPropertyIndex = 2;
+ private const int aPropertyIndex = 3;
+ private const int bPropertyIndex = 4;
+ private const int cPropertyIndex = 5;
+
+ [Test]
+ public void Constructor_ExpectedValues()
+ {
+ // Setup
+ var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism();
+
+ // Call
+ var properties = new WaveImpactAsphaltCoverHydraulicLoadsProperties(failureMechanism);
+
+ // Assert
+ Assert.IsInstanceOf(properties);
+ Assert.AreSame(failureMechanism, properties.Data);
+ Assert.AreEqual(failureMechanism.Name, properties.Name);
+ Assert.AreEqual(failureMechanism.Code, properties.Code);
+ Assert.AreEqual(failureMechanism.Group, properties.Group);
+
+ GeneralWaveConditionsInput generalWaveConditionsInput = failureMechanism.GeneralInput;
+ Assert.AreEqual(generalWaveConditionsInput.A, properties.A);
+ Assert.AreEqual(generalWaveConditionsInput.B, properties.B);
+ Assert.AreEqual(generalWaveConditionsInput.C, properties.C);
+ }
+
+ [Test]
+ public void Constructor_Always_PropertiesHaveExpectedAttributeValues()
+ {
+ // Call
+ var properties = new WaveImpactAsphaltCoverHydraulicLoadsProperties(new WaveImpactAsphaltCoverFailureMechanism());
+
+ // Assert
+ PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
+ Assert.AreEqual(6, dynamicProperties.Count);
+
+ const string generalCategory = "Algemeen";
+ const string modelSettingsCategory = "Modelinstellingen";
+
+ PropertyDescriptor nameProperty = dynamicProperties[namePropertyIndex];
+ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(nameProperty,
+ generalCategory,
+ "Naam",
+ "De naam van het toetsspoor.",
+ true);
+
+ PropertyDescriptor codeProperty = dynamicProperties[codePropertyIndex];
+ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(codeProperty,
+ generalCategory,
+ "Label",
+ "Het label van het toetsspoor.",
+ true);
+
+ PropertyDescriptor groupProperty = dynamicProperties[groupPropertyIndex];
+ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(groupProperty,
+ generalCategory,
+ "Groep",
+ "De groep waar het toetsspoor toe behoort.",
+ true);
+
+ PropertyDescriptor aProperty = dynamicProperties[aPropertyIndex];
+ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(aProperty,
+ modelSettingsCategory,
+ "a",
+ "De waarde van de parameter 'a' in de berekening voor golfcondities.",
+ true);
+
+ PropertyDescriptor bProperty = dynamicProperties[bPropertyIndex];
+ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(bProperty,
+ modelSettingsCategory,
+ "b",
+ "De waarde van de parameter 'b' in de berekening voor golfcondities.",
+ true);
+
+ PropertyDescriptor cProperty = dynamicProperties[cPropertyIndex];
+ PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(cProperty,
+ modelSettingsCategory,
+ "c",
+ "De waarde van de parameter 'c' in de berekening voor golfcondities.",
+ true);
+ }
+ }
+}
\ No newline at end of file
Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/PropertyInfos/WaveImpactAsphaltCoverHydraulicLoadsContextPropertyInfoTest.cs
===================================================================
diff -u -r1dd2c22368f99235c15314f434505d4b5fc27a90 -r42b5598732d84341529bc3188cf120606eeac52a
--- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/PropertyInfos/WaveImpactAsphaltCoverHydraulicLoadsContextPropertyInfoTest.cs (.../WaveImpactAsphaltCoverHydraulicLoadsContextPropertyInfoTest.cs) (revision 1dd2c22368f99235c15314f434505d4b5fc27a90)
+++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/PropertyInfos/WaveImpactAsphaltCoverHydraulicLoadsContextPropertyInfoTest.cs (.../WaveImpactAsphaltCoverHydraulicLoadsContextPropertyInfoTest.cs) (revision 42b5598732d84341529bc3188cf120606eeac52a)
@@ -45,7 +45,7 @@
// Assert
Assert.AreEqual(typeof(WaveImpactAsphaltCoverHydraulicLoadsContext), info.DataType);
- Assert.AreEqual(typeof(WaveImpactAsphaltCoverCalculationsProperties), info.PropertyObjectType);
+ Assert.AreEqual(typeof(WaveImpactAsphaltCoverHydraulicLoadsProperties), info.PropertyObjectType);
}
}
@@ -68,7 +68,7 @@
IObjectProperties objectProperties = info.CreateInstance(context);
// Assert
- Assert.IsInstanceOf(objectProperties);
+ Assert.IsInstanceOf(objectProperties);
Assert.AreSame(failureMechanism, objectProperties.Data);
}
Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs
===================================================================
diff -u -r1dd2c22368f99235c15314f434505d4b5fc27a90 -r42b5598732d84341529bc3188cf120606eeac52a
--- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 1dd2c22368f99235c15314f434505d4b5fc27a90)
+++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 42b5598732d84341529bc3188cf120606eeac52a)
@@ -68,7 +68,7 @@
PluginTestHelper.AssertPropertyInfoDefined(
propertyInfos,
typeof(WaveImpactAsphaltCoverHydraulicLoadsContext),
- typeof(WaveImpactAsphaltCoverCalculationsProperties));
+ typeof(WaveImpactAsphaltCoverHydraulicLoadsProperties));
PluginTestHelper.AssertPropertyInfoDefined(
propertyInfos,